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

c1=S[B-2:D+1].count('...')
c2=S[A-1:D].count('##')

if c2>=1:
    print('No')
    exit()
else:
    pass

if C>D and c1==0:
    print('No')
    exit()
else:
    pass


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=input() S input() input c1=S[B-2:D+1].count('...') c1 S[B-2:D+1].count('...') [B-2:D+1].count [B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 count '...' c2=S[A-1:D].count('##') c2 S[A-1:D].count('##') [A-1:D].count [A-1:D] S A-1:D A-1 A 1 D count '##' if c2>=1:
    print('No')
    exit()
else:
    pass c2>=1 c2 1 print('No') print 'No' exit() exit if C>D and c1==0:
    print('No')
    exit()
else:
    pass C>D and c1==0 C>D C D c1==0 c1 0 print('No') print 'No' exit() exit print('Yes') print 'Yes' c2=S[A-1:D].count('##') S[A-1:D].count('##') c2 N,A,B,C,D=map(int,input().split()) map(int,input().split()) N D=map(int,input().split()) map(int,input().split()) D C,D=map(int,input().split()) map(int,input().split()) C A,B,C,D=map(int,input().split()) map(int,input().split()) A c1=S[B-2:D+1].count('...') S[B-2:D+1].count('...') c1 B,C,D=map(int,input().split()) map(int,input().split()) B S=input() input() S
N,A,B,C,D=map(int,input().split())
S=input()

c1=S[B-2:D+1].count('...')
c2=S[A-1:D].count('##')

if c2>=1:
    print('No')
    exit()
else:
    pass

if C>D and c1==0:
    print('No')
    exit()
else:
    pass


print('Yes')
