n,a,b,c,d = map(int,input().split())
s = input()
if d<c:
    if "##" not in s[a-1:d] and '...' in s[b-2:d+1]:
        print('Yes')
    else:
        print('No')
    
else:
    if "##" not in s[a-1:d]:
        print('Yes')
    else:
        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 d<c:
    if "##" not in s[a-1:d] and '...' in s[b-2:d+1]:
        print('Yes')
    else:
        print('No')
    
else:
    if "##" not in s[a-1:d]:
        print('Yes')
    else:
        print('No') d<c d c if "##" not in s[a-1:d] and '...' in s[b-2:d+1]:
        print('Yes')
    else:
        print('No')
     "##" not in s[a-1:d] and '...' in s[b-2:d+1] "##" not in s[a-1:d] "##" s[a-1:d] s a-1:d a-1 a 1 d '...' in s[b-2:d+1] '...' s[b-2:d+1] s b-2:d+1 b-2 b 2 d+1 d 1 print('Yes') print 'Yes' print('No') print 'No' if "##" not in s[a-1:d]:
        print('Yes')
    else:
        print('No') "##" not in s[a-1:d] "##" s[a-1:d] s a-1:d a-1 a 1 d print('Yes') print 'Yes' print('No') print 'No' c,d = map(int,input().split()) map(int,input().split()) c 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 s = input() input() s n,a,b,c,d = map(int,input().split()) map(int,input().split()) n d = map(int,input().split()) map(int,input().split()) d
n,a,b,c,d = map(int,input().split())
s = input()
if d<c:
    if "##" not in s[a-1:d] and '...' in s[b-2:d+1]:
        print('Yes')
    else:
        print('No')
    
else:
    if "##" not in s[a-1:d]:
        print('Yes')
    else:
        print('No')