N,A,B,C,D=map(int,input().split())
S=input()

ans='Yes'
if '##'in S[A-1:C]:
    ans='No'
elif '##'in S[B-1:D]:
    ans='No'
elif C>D and ('...'not in S[B-2:D]):
    ans='No'
    if S[D-2]=='.' and S[D]=='.':
        ans='Yes'

print(ans) 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=input() S input() input ans='Yes' ans 'Yes' if '##'in S[A-1:C]:
    ans='No'
elif '##'in S[B-1:D]:
    ans='No'
elif C>D and ('...'not in S[B-2:D]):
    ans='No'
    if S[D-2]=='.' and S[D]=='.':
        ans='Yes' '##'in S[A-1:C] '##' S[A-1:C] S A-1:C A-1 A 1 C ans='No' ans 'No' elif '##'in S[B-1:D]:
    ans='No' '##'in S[B-1:D] '##' S[B-1:D] S B-1:D B-1 B 1 D ans='No' ans 'No' elif C>D and ('...'not in S[B-2:D]):
    ans='No'
    if S[D-2]=='.' and S[D]=='.':
        ans='Yes' C>D and ('...'not in S[B-2:D]) C>D C D '...'not in S[B-2:D] '...' S[B-2:D] S B-2:D B-2 B 2 D ans='No' ans 'No' if S[D-2]=='.' and S[D]=='.':
        ans='Yes' S[D-2]=='.' and S[D]=='.' S[D-2]=='.' S[D-2] S D-2 D 2 '.' S[D]=='.' S[D] S D '.' ans='Yes' ans 'Yes' print(ans) print ans ans='No' 'No' ans N,A,B,C,D=map(int,input().split()) map(int,input().split()) N A,B,C,D=map(int,input().split()) map(int,input().split()) A B,C,D=map(int,input().split()) map(int,input().split()) B C,D=map(int,input().split()) map(int,input().split()) C D=map(int,input().split()) map(int,input().split()) D ans='Yes' 'Yes' ans ans='No' 'No' ans S=input() input() S ans='No' 'No' ans ans='Yes' 'Yes' ans
N,A,B,C,D=map(int,input().split())
S=input()

ans='Yes'
if '##'in S[A-1:C]:
    ans='No'
elif '##'in S[B-1:D]:
    ans='No'
elif C>D and ('...'not in S[B-2:D]):
    ans='No'
    if S[D-2]=='.' and S[D]=='.':
        ans='Yes'

print(ans)