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

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

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