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

s=input()

if c<d or c<b:
    #先にbをdに運んでから、aをCに運べばいい
    if s[b:d+1].count("##")==0 and s[a:c+1].count("##")==0:
        print("Yes")
    else:
        print("No") 
else:
    if s[b-1:d+2].count("...")==0:
        print("No")
    else:
        if s[b:d+1].count("##")==0 and s[a:c+1].count("##")==0:
            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 a-=1 a 1 b-=1 b 1 c-=1 c 1 d-=1 d 1 s=input() s input() input if c<d or c<b:
    #先にbをdに運んでから、aをCに運べばいい
    if s[b:d+1].count("##")==0 and s[a:c+1].count("##")==0:
        print("Yes")
    else:
        print("No") 
else:
    if s[b-1:d+2].count("...")==0:
        print("No")
    else:
        if s[b:d+1].count("##")==0 and s[a:c+1].count("##")==0:
            print("Yes")
        else:
            print("No")  c<d or c<b c<d c d c<b c b if s[b:d+1].count("##")==0 and s[a:c+1].count("##")==0:
        print("Yes")
    else:
        print("No")  s[b:d+1].count("##")==0 and s[a: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 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 print("Yes") print "Yes" print("No") print "No" if s[b-1:d+2].count("...")==0:
        print("No")
    else:
        if s[b:d+1].count("##")==0 and s[a:c+1].count("##")==0:
            print("Yes")
        else:
            print("No")  s[b-1:d+2].count("...")==0 s[b-1:d+2].count("...") [b-1:d+2].count [b-1:d+2] s b-1:d+2 b-1 b 1 d+2 d 2 count "..." 0 print("No") print "No" if s[b:d+1].count("##")==0 and s[a:c+1].count("##")==0:
            print("Yes")
        else:
            print("No")  s[b:d+1].count("##")==0 and s[a: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 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 print("Yes") print "Yes" print("No") print "No" 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 b,c,d=map(int,input().split()) map(int,input().split()) b a-=1 1 a b-=1 1 b c,d=map(int,input().split()) map(int,input().split()) c d=map(int,input().split()) map(int,input().split()) d s=input() input() s d-=1 1 d c-=1 1 c
n,a,b,c,d=map(int,input().split())
a-=1
b-=1
c-=1
d-=1

s=input()

if c<d or c<b:
    #先にbをdに運んでから、aをCに運べばいい
    if s[b:d+1].count("##")==0 and s[a:c+1].count("##")==0:
        print("Yes")
    else:
        print("No") 
else:
    if s[b-1:d+2].count("...")==0:
        print("No")
    else:
        if s[b:d+1].count("##")==0 and s[a:c+1].count("##")==0:
            print("Yes")
        else:
            print("No") 




