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

if c<d:
    if s[a-1:d].find("##")!=-1:
        print("No")
    else:
        print("Yes")

else:
    if s[a-1:c].find("##")!=-1:
        print("No")
    else:
        if s[b-2:d+1].find("...")!=-1:
            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 c<d:
    if s[a-1:d].find("##")!=-1:
        print("No")
    else:
        print("Yes")

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

if c<d:
    if s[a-1:d].find("##")!=-1:
        print("No")
    else:
        print("Yes")

else:
    if s[a-1:c].find("##")!=-1:
        print("No")
    else:
        if s[b-2:d+1].find("...")!=-1:
            print("Yes")
        else:
            print("No")