n,a,b,c,d = map(int,input().split())

s=input()

s=list(s)

for i in range(a,max(c,d)):
    if s[i-1] == s[i] == '#':
        print('No')
        exit()

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

s=input()

s=list(s)

for i in range(a,max(c,d)):
    if s[i-1] == s[i] == '#':
        print('No')
        exit()

if c < d:
    print('Yes')
else:
    for i in range(b-2,d-1):
        if s[i] == s[i+1] == s[i+2] == '.':
            print('Yes')
            exit()
    print('No')