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