N,A,B,C,D=map(int,input().split())
S=input()
a=1
for i in range(A,C-2):
    if S[i]==S[i+1]=="#":
        a=0
        break
for i in range(B,D-2):
    if S[i]==S[i+1]=="#":
        a=0
        break
if C>D:
    for i in range(B-1,D):
        if S[i-1]==S[i]==S[i+1]==".":
            break
    else:
        a=0
print("Yes" if a else "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 a=1 a 1 for i in range(A,C-2):
    if S[i]==S[i+1]=="#":
        a=0
        break i range(A,C-2) range A C-2 C 2 if S[i]==S[i+1]=="#":
        a=0
        break S[i]==S[i+1]=="#" S[i]==S[i+1] S[i] S i S[i+1] S i+1 i 1 "#" a=0 a 0 break for i in range(B,D-2):
    if S[i]==S[i+1]=="#":
        a=0
        break i range(B,D-2) range B D-2 D 2 if S[i]==S[i+1]=="#":
        a=0
        break S[i]==S[i+1]=="#" S[i]==S[i+1] S[i] S i S[i+1] S i+1 i 1 "#" a=0 a 0 break if C>D:
    for i in range(B-1,D):
        if S[i-1]==S[i]==S[i+1]==".":
            break
    else:
        a=0 C>D C D for i in range(B-1,D):
        if S[i-1]==S[i]==S[i+1]==".":
            break
    else:
        a=0 i range(B-1,D) range B-1 B 1 D if S[i-1]==S[i]==S[i+1]==".":
            break
     S[i-1]==S[i]==S[i+1]=="." S[i-1]==S[i]==S[i+1] S[i-1]==S[i] S[i-1] S i-1 i 1 S[i] S i S[i+1] S i+1 i 1 "." break a=0 a 0 print("Yes" if a else "No") print "Yes" if a else "No" a "Yes" "No" a=1 1 a 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 a=0 0 a B,C,D=map(int,input().split()) map(int,input().split()) B C,D=map(int,input().split()) map(int,input().split()) C D=map(int,input().split()) map(int,input().split()) D a=0 0 a S=input() input() S a=0 0 a
N,A,B,C,D=map(int,input().split())
S=input()
a=1
for i in range(A,C-2):
    if S[i]==S[i+1]=="#":
        a=0
        break
for i in range(B,D-2):
    if S[i]==S[i+1]=="#":
        a=0
        break
if C>D:
    for i in range(B-1,D):
        if S[i-1]==S[i]==S[i+1]==".":
            break
    else:
        a=0
print("Yes" if a else "No")