N,A,B,C,D=map(int,input().split())
S=input()
if '##' in S[A-1:C] or '##' in S[B-1:D]:
    print('No')
    exit()

if C<D:
    print('Yes')
else:
    cnt=0
    for i in range(B-1,D):
        if S[i-1]==S[i] and S[i]==S[i+1] and S[i]=='.':
            print('Yes')
            exit()
    print('No') 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 if '##' in S[A-1:C] or '##' in S[B-1:D]:
    print('No')
    exit() '##' in S[A-1:C] or '##' in S[B-1:D] '##' in S[A-1:C] '##' S[A-1:C] S A-1:C A-1 A 1 C '##' in S[B-1:D] '##' S[B-1:D] S B-1:D B-1 B 1 D print('No') print 'No' exit() exit if C<D:
    print('Yes')
else:
    cnt=0
    for i in range(B-1,D):
        if S[i-1]==S[i] and S[i]==S[i+1] and S[i]=='.':
            print('Yes')
            exit()
    print('No') C<D C D print('Yes') print 'Yes' cnt=0 cnt 0 for i in range(B-1,D):
        if S[i-1]==S[i] and S[i]==S[i+1] and S[i]=='.':
            print('Yes')
            exit()
     i range(B-1,D) range B-1 B 1 D if S[i-1]==S[i] and S[i]==S[i+1] and S[i]=='.':
            print('Yes')
            exit()
     S[i-1]==S[i] and S[i]==S[i+1] and S[i]=='.' S[i-1]==S[i] and S[i]==S[i+1] S[i-1]==S[i] S[i-1] S i-1 i 1 S[i] S i S[i]==S[i+1] S[i] S i S[i+1] S i+1 i 1 S[i]=='.' S[i] S i '.' print('Yes') print 'Yes' exit() exit print('No') print 'No' 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 D=map(int,input().split()) map(int,input().split()) D cnt=0 0 cnt B,C,D=map(int,input().split()) map(int,input().split()) B S=input() input() S C,D=map(int,input().split()) map(int,input().split()) C
N,A,B,C,D=map(int,input().split())
S=input()
if '##' in S[A-1:C] or '##' in S[B-1:D]:
    print('No')
    exit()

if C<D:
    print('Yes')
else:
    cnt=0
    for i in range(B-1,D):
        if S[i-1]==S[i] and S[i]==S[i+1] and S[i]=='.':
            print('Yes')
            exit()
    print('No')