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