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