n , a , b , c , d = map(int,input().split())
s = input()
if s[a:c+1].count("##") != 0 or s[b:d+1].count("##") != 0:
    print("No")
    exit()
if c > d:
    if s[b-2:d+1].count("...") == 0:
        print("No")
        exit()
print("Yes") 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 s[a:c+1].count("##") != 0 or s[b:d+1].count("##") != 0:
    print("No")
    exit() s[a:c+1].count("##") != 0 or s[b:d+1].count("##") != 0 s[a:c+1].count("##") != 0 s[a:c+1].count("##") [a:c+1].count [a:c+1] s a:c+1 a c+1 c 1 count "##" 0 s[b:d+1].count("##") != 0 s[b:d+1].count("##") [b:d+1].count [b:d+1] s b:d+1 b d+1 d 1 count "##" 0 print("No") print "No" exit() exit if c > d:
    if s[b-2:d+1].count("...") == 0:
        print("No")
        exit() c > d c d if s[b-2:d+1].count("...") == 0:
        print("No")
        exit() s[b-2:d+1].count("...") == 0 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 "..." 0 print("No") print "No" exit() exit print("Yes") print "Yes" n , a , b , c , d = map(int,input().split()) map(int,input().split()) n d = map(int,input().split()) map(int,input().split()) d b , c , d = map(int,input().split()) map(int,input().split()) b a , b , c , d = map(int,input().split()) map(int,input().split()) a 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 s[a:c+1].count("##") != 0 or s[b:d+1].count("##") != 0:
    print("No")
    exit()
if c > d:
    if s[b-2:d+1].count("...") == 0:
        print("No")
        exit()
print("Yes")