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