n,a,b,c,d = map(int,input().split())
S = list(input())

flg = 1
for i in range(a-1,c-2):
    if S[i:i+2] == ['#','#']:
        flg *= 0

for i in range(b-1,d-2):
    if S[i:i+2] == ['#','#']:
        flg *= 0

if c>d:
    flg2 = 0
    for i in range(b-1,d):
        if S[i-1:i+2] == ['.','.','.']:
            flg2 = 1
    flg *= flg2

if flg == 0:
    print('No')
else:
    print('Yes') n,a,b,c,d = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split a b c d S = list(input()) S list(input()) list input() input flg = 1 flg 1 for i in range(a-1,c-2):
    if S[i:i+2] == ['#','#']:
        flg *= 0 i range(a-1,c-2) range a-1 a 1 c-2 c 2 if S[i:i+2] == ['#','#']:
        flg *= 0 S[i:i+2] == ['#','#'] S[i:i+2] S i:i+2 i i+2 i 2 ['#','#'] '#' '#' flg *= 0 flg 0 for i in range(b-1,d-2):
    if S[i:i+2] == ['#','#']:
        flg *= 0 i range(b-1,d-2) range b-1 b 1 d-2 d 2 if S[i:i+2] == ['#','#']:
        flg *= 0 S[i:i+2] == ['#','#'] S[i:i+2] S i:i+2 i i+2 i 2 ['#','#'] '#' '#' flg *= 0 flg 0 if c>d:
    flg2 = 0
    for i in range(b-1,d):
        if S[i-1:i+2] == ['.','.','.']:
            flg2 = 1
    flg *= flg2 c>d c d flg2 = 0 flg2 0 for i in range(b-1,d):
        if S[i-1:i+2] == ['.','.','.']:
            flg2 = 1
     i range(b-1,d) range b-1 b 1 d if S[i-1:i+2] == ['.','.','.']:
            flg2 = 1
     S[i-1:i+2] == ['.','.','.'] S[i-1:i+2] S i-1:i+2 i-1 i 1 i+2 i 2 ['.','.','.'] '.' '.' '.' flg2 = 1 flg2 1 flg *= flg2 flg flg2 if flg == 0:
    print('No')
else:
    print('Yes') flg == 0 flg 0 print('No') print 'No' print('Yes') print 'Yes' flg *= flg2 flg2 flg d = map(int,input().split()) map(int,input().split()) d a,b,c,d = map(int,input().split()) map(int,input().split()) a n,a,b,c,d = map(int,input().split()) map(int,input().split()) n b,c,d = map(int,input().split()) map(int,input().split()) b S = list(input()) list(input()) S flg2 = 1 1 flg2 flg2 = 0 0 flg2 c,d = map(int,input().split()) map(int,input().split()) c flg = 1 1 flg flg *= 0 0 flg flg *= 0 0 flg
n,a,b,c,d = map(int,input().split())
S = list(input())

flg = 1
for i in range(a-1,c-2):
    if S[i:i+2] == ['#','#']:
        flg *= 0

for i in range(b-1,d-2):
    if S[i:i+2] == ['#','#']:
        flg *= 0

if c>d:
    flg2 = 0
    for i in range(b-1,d):
        if S[i-1:i+2] == ['.','.','.']:
            flg2 = 1
    flg *= flg2

if flg == 0:
    print('No')
else:
    print('Yes')