import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right #func(リスト,値)
from heapq import heapify, heappop, heappush
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)
def ston(c, c0='a'):
    return ord(c)-ord(c0)
def ntos(x, c0='a'):
    return chr(x+ord(c0))
class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x):
        self.setdefault(x,0)
        self[x] += 1

N,A,B,C,D = mint()
S = input()

def f(m,n):
    block2 = space3 = False
    b = s = 0
    for i in range(m-1,n):
        (b,s) = (b+1,0) if S[i]=='#' else (0,s+1)
        if not block2 and b==2:
            block2 = True
        if not space3 and s==3:
            space3 = True
    return block2, space3

if D<C:
    judge(not f(A,C)[0] and f(B-1,D+1)[1])
else:
    judge(not f(A,C)[0] and not f(B,D)[0]) import sys sys from sys import exit from collections import deque from bisect import bisect_left, bisect_right, insort_left, insort_right from heapq import heapify, heappop, heappush from math import * sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 INF = 10**20 INF 10**20 10 20 eps = 1.0e-20 eps 1.0e-20 MOD = 10**9+7 MOD 10**9+7 10**9 10 9 7 def lcm(x,y):
    return x*y//gcd(x,y) lcm return x*y//gcd(x,y) x*y//gcd(x,y) x*y x y gcd(x,y) gcd x y x x y y def mint():
    return map(int,input().split()) mint return map(int,input().split()) map(int,input().split()) map int input().split() ().split () input split def lint():
    return list(map(int,input().split())) lint return list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split def ilint():
    return int(input()), list(map(int,input().split())) ilint return int(input()), list(map(int,input().split())) return int(input()), list(map(int,input().split())) int(input()) int input() input list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1]) judge print(l[0] if x else l[1]) print l[0] if x else l[1] x l[0] l 0 l[1] l 1 x x l=['Yes', 'No'] l ['Yes', 'No'] 'Yes' 'No' def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep) lprint for x in l:
        print(x, end=sep) x l print(x, end=sep) print x end=sep end sep l l sep='\n' sep '\n' def ston(c, c0='a'):
    return ord(c)-ord(c0) ston return ord(c)-ord(c0) ord(c)-ord(c0) ord(c) ord c ord(c0) ord c0 c c c0='a' c0 'a' def ntos(x, c0='a'):
    return chr(x+ord(c0)) ntos return chr(x+ord(c0)) chr(x+ord(c0)) chr x+ord(c0) x ord(c0) ord c0 x x c0='a' c0 'a' class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x):
        self.setdefault(x,0)
        self[x] += 1 counter def __init__(self, *args):
        super().__init__(args)
     __init__ super().__init__(args) ().__init__ () super __init__ args self self *args def add(self,x):
        self.setdefault(x,0)
        self[x] += 1 add self.setdefault(x,0) self.setdefault self setdefault x 0 self[x] += 1 self[x] self x 1 self self x x dict N,A,B,C,D = mint() N mint() mint A B C D S = input() S input() input def f(m,n):
    block2 = space3 = False
    b = s = 0
    for i in range(m-1,n):
        (b,s) = (b+1,0) if S[i]=='#' else (0,s+1)
        if not block2 and b==2:
            block2 = True
        if not space3 and s==3:
            space3 = True
    return block2, space3 f block2 = space3 = False block2 False = space3 = False space3 False b = s = 0 b 0 = s = 0 s 0 for i in range(m-1,n):
        (b,s) = (b+1,0) if S[i]=='#' else (0,s+1)
        if not block2 and b==2:
            block2 = True
        if not space3 and s==3:
            space3 = True
     i range(m-1,n) range m-1 m 1 n (b,s) = (b+1,0) if S[i]=='#' else (0,s+1) (b,s) b s (b+1,0) if S[i]=='#' else (0,s+1) S[i]=='#' S[i] S i '#' (b+1,0) b+1 b 1 0 (0,s+1) 0 s+1 s 1 if not block2 and b==2:
            block2 = True
         not block2 and b==2 not block2 block2 b==2 b 2 block2 = True block2 True if not space3 and s==3:
            space3 = True
     not space3 and s==3 not space3 space3 s==3 s 3 space3 = True space3 True return block2, space3 return block2, space3 block2 space3 m m n n if D<C:
    judge(not f(A,C)[0] and f(B-1,D+1)[1])
else:
    judge(not f(A,C)[0] and not f(B,D)[0]) D<C D C judge(not f(A,C)[0] and f(B-1,D+1)[1]) judge not f(A,C)[0] and f(B-1,D+1)[1] not f(A,C)[0] f(A,C)[0] (A,C) f A C 0 f(B-1,D+1)[1] (B-1,D+1) f B-1 B 1 D+1 D 1 1 judge(not f(A,C)[0] and not f(B,D)[0]) judge not f(A,C)[0] and not f(B,D)[0] not f(A,C)[0] f(A,C)[0] (A,C) f A C 0 not f(B,D)[0] f(B,D)[0] (B,D) f B D 0 INF = 10**20 10**20 INF class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x):
        self.setdefault(x,0)
        self[x] += 1 class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x):
        self.setdefault(x,0)
        self[x] += 1 counter def lint():
    return list(map(int,input().split())) def lint():
    return list(map(int,input().split())) lint def ilint():
    return int(input()), list(map(int,input().split())) def ilint():
    return int(input()), list(map(int,input().split())) ilint A,B,C,D = mint() mint() A S = input() input() S N,A,B,C,D = mint() mint() N D = mint() mint() D def lcm(x,y):
    return x*y//gcd(x,y) def lcm(x,y):
    return x*y//gcd(x,y) lcm def mint():
    return map(int,input().split()) def mint():
    return map(int,input().split()) mint def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1]) def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1]) judge B,C,D = mint() mint() B def f(m,n):
    block2 = space3 = False
    b = s = 0
    for i in range(m-1,n):
        (b,s) = (b+1,0) if S[i]=='#' else (0,s+1)
        if not block2 and b==2:
            block2 = True
        if not space3 and s==3:
            space3 = True
    return block2, space3 def f(m,n):
    block2 = space3 = False
    b = s = 0
    for i in range(m-1,n):
        (b,s) = (b+1,0) if S[i]=='#' else (0,s+1)
        if not block2 and b==2:
            block2 = True
        if not space3 and s==3:
            space3 = True
    return block2, space3 f def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep) def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep) lprint eps = 1.0e-20 1.0e-20 eps C,D = mint() mint() C def ntos(x, c0='a'):
    return chr(x+ord(c0)) def ntos(x, c0='a'):
    return chr(x+ord(c0)) ntos MOD = 10**9+7 10**9+7 MOD def ston(c, c0='a'):
    return ord(c)-ord(c0) def ston(c, c0='a'):
    return ord(c)-ord(c0) ston
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right #func(リスト,値)
from heapq import heapify, heappop, heappush
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)
def ston(c, c0='a'):
    return ord(c)-ord(c0)
def ntos(x, c0='a'):
    return chr(x+ord(c0))
class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x):
        self.setdefault(x,0)
        self[x] += 1

N,A,B,C,D = mint()
S = input()

def f(m,n):
    block2 = space3 = False
    b = s = 0
    for i in range(m-1,n):
        (b,s) = (b+1,0) if S[i]=='#' else (0,s+1)
        if not block2 and b==2:
            block2 = True
        if not space3 and s==3:
            space3 = True
    return block2, space3

if D<C:
    judge(not f(A,C)[0] and f(B-1,D+1)[1])
else:
    judge(not f(A,C)[0] and not f(B,D)[0])