n,a,b,c,d = list(map(int, input().split()))
a,b,c,d = a-1,b-1,c-1,d-1 #indexに合わせる
s = input()
k = 0
swappable = False
possible = True

#A-C, B-D に岩が二つ並んでいる箇所があるなら不可能

#C>Dの場合B以上の位置で3マス以上の空白があれば
for i in range(a, max(c,d)):#+1):
    j = s[i]
    if j=='#':
        if (k==0) and ((a<i<c) or (b<i<d)):
            possible = False
            break
        k = 0
    if j=='.':
        k += 1
        if (k>=3) and (b<i<=(d+1)):
            swappable = True
    

if (c>d) and (not swappable):
    possible = False

print('Yes' if possible else 'No') n,a,b,c,d = list(map(int, input().split())) n list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split a b c d a,b,c,d = a-1,b-1,c-1,d-1 a a-1 a 1 b b-1 b 1 c c-1 c 1 d d-1 d 1 s = input() s input() input k = 0 k 0 swappable = False swappable False possible = True possible True for i in range(a, max(c,d)):#+1):
    j = s[i]
    if j=='#':
        if (k==0) and ((a<i<c) or (b<i<d)):
            possible = False
            break
        k = 0
    if j=='.':
        k += 1
        if (k>=3) and (b<i<=(d+1)):
            swappable = True
     i range(a, max(c,d)) range a max(c,d) max c d j = s[i] j s[i] s i if j=='#':
        if (k==0) and ((a<i<c) or (b<i<d)):
            possible = False
            break
        k = 0
     j=='#' j '#' if (k==0) and ((a<i<c) or (b<i<d)):
            possible = False
            break
         (k==0) and ((a<i<c) or (b<i<d)) k==0 k 0 (a<i<c) or (b<i<d) a<i<c a<i a i c b<i<d b<i b i d possible = False possible False break k = 0 k 0 if j=='.':
        k += 1
        if (k>=3) and (b<i<=(d+1)):
            swappable = True
     j=='.' j '.' k += 1 k 1 if (k>=3) and (b<i<=(d+1)):
            swappable = True
     (k>=3) and (b<i<=(d+1)) k>=3 k 3 b<i<=(d+1) b<i b i d+1 d 1 swappable = True swappable True if (c>d) and (not swappable):
    possible = False (c>d) and (not swappable) c>d c d not swappable swappable possible = False possible False print('Yes' if possible else 'No') print 'Yes' if possible else 'No' possible 'Yes' 'No' c,d = a-1,b-1,c-1,d-1 c-1 c d = a-1,b-1,c-1,d-1 d-1 d j = s[i] s[i] j swappable = True True swappable a,b,c,d = list(map(int, input().split())) list(map(int, input().split())) a k = 0 0 k possible = False False possible possible = False False possible s = input() input() s a,b,c,d = a-1,b-1,c-1,d-1 a-1 a swappable = False False swappable possible = True True possible d = list(map(int, input().split())) list(map(int, input().split())) d k = 0 0 k n,a,b,c,d = list(map(int, input().split())) list(map(int, input().split())) n k += 1 1 k b,c,d = list(map(int, input().split())) list(map(int, input().split())) b b,c,d = a-1,b-1,c-1,d-1 b-1 b c,d = list(map(int, input().split())) list(map(int, input().split())) c
n,a,b,c,d = list(map(int, input().split()))
a,b,c,d = a-1,b-1,c-1,d-1 #indexに合わせる
s = input()
k = 0
swappable = False
possible = True

#A-C, B-D に岩が二つ並んでいる箇所があるなら不可能

#C>Dの場合B以上の位置で3マス以上の空白があれば
for i in range(a, max(c,d)):#+1):
    j = s[i]
    if j=='#':
        if (k==0) and ((a<i<c) or (b<i<d)):
            possible = False
            break
        k = 0
    if j=='.':
        k += 1
        if (k>=3) and (b<i<=(d+1)):
            swappable = True
    

if (c>d) and (not swappable):
    possible = False

print('Yes' if possible else 'No')