n,a,b,c,d=map(int,input().split())
a-=1
b-=1
c-=1
d-=1
s=input()
bl_bl=[]
jump=[]
ans=1

for i in range(1,n-1):
    if s[i-1:i+1]=="##":
        if a<i<c or b<i<d:
            ans=2
            break
    if s[i-1:i+2]=="...":
        jump.append(i)

if ans!=2:
    if c<d:
        ans=0
    else:
        for i in jump:
            if b<=i<=d:
                ans=0
                break

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

for i in range(1,n-1):
    if s[i-1:i+1]=="##":
        if a<i<c or b<i<d:
            ans=2
            break
    if s[i-1:i+2]=="...":
        jump.append(i)

if ans!=2:
    if c<d:
        ans=0
    else:
        for i in jump:
            if b<=i<=d:
                ans=0
                break

print("Yes" if ans==0 else "No") 