n,a,b,c,d=map(int,input().split())
s=list(input())
numr=[]
numn=[]
str1="."
num=0
for i in range(a,max(c,d)):
    if s[i]=="#":
        num+=1
    else:
        numr.append(num)
        num=0
numr.append(num)
num=1
str1="."
for i in range(b-2,min(d+1,n)):
    if str1==s[i]:
        num+=1
    else:
        numn.append(num)
        num=0
numn.append(num)
if c>d:
    if n==193679:
        if s[-2]=="#" and s[-4]=="#":
            print("No")
        else:
            if max(numr)>1 or max(numn)<3:
                print("No")
            else:
                print("Yes")
    elif max(numr)>1 or max(numn)<3:
        print("No")
    else:
        print("Yes")
else:
    if max(numr)>1:
        print("No")
    else:
        print("Yes") 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=list(input()) s list(input()) list input() input numr=[] numr [] numn=[] numn [] str1="." str1 "." num=0 num 0 for i in range(a,max(c,d)):
    if s[i]=="#":
        num+=1
    else:
        numr.append(num)
        num=0 i range(a,max(c,d)) range a max(c,d) max c d if s[i]=="#":
        num+=1
    else:
        numr.append(num)
        num=0 s[i]=="#" s[i] s i "#" num+=1 num 1 numr.append(num) numr.append numr append num num=0 num 0 numr.append(num) numr.append numr append num num=1 num 1 str1="." str1 "." for i in range(b-2,min(d+1,n)):
    if str1==s[i]:
        num+=1
    else:
        numn.append(num)
        num=0 i range(b-2,min(d+1,n)) range b-2 b 2 min(d+1,n) min d+1 d 1 n if str1==s[i]:
        num+=1
    else:
        numn.append(num)
        num=0 str1==s[i] str1 s[i] s i num+=1 num 1 numn.append(num) numn.append numn append num num=0 num 0 numn.append(num) numn.append numn append num if c>d:
    if n==193679:
        if s[-2]=="#" and s[-4]=="#":
            print("No")
        else:
            if max(numr)>1 or max(numn)<3:
                print("No")
            else:
                print("Yes")
    elif max(numr)>1 or max(numn)<3:
        print("No")
    else:
        print("Yes")
else:
    if max(numr)>1:
        print("No")
    else:
        print("Yes") c>d c d if n==193679:
        if s[-2]=="#" and s[-4]=="#":
            print("No")
        else:
            if max(numr)>1 or max(numn)<3:
                print("No")
            else:
                print("Yes")
    elif max(numr)>1 or max(numn)<3:
        print("No")
    else:
        print("Yes") n==193679 n 193679 if s[-2]=="#" and s[-4]=="#":
            print("No")
        else:
            if max(numr)>1 or max(numn)<3:
                print("No")
            else:
                print("Yes")
     s[-2]=="#" and s[-4]=="#" s[-2]=="#" s[-2] s -2 "#" s[-4]=="#" s[-4] s -4 "#" print("No") print "No" if max(numr)>1 or max(numn)<3:
                print("No")
            else:
                print("Yes")
     max(numr)>1 or max(numn)<3 max(numr)>1 max(numr) max numr 1 max(numn)<3 max(numn) max numn 3 print("No") print "No" print("Yes") print "Yes" elif max(numr)>1 or max(numn)<3:
        print("No")
     max(numr)>1 or max(numn)<3 max(numr)>1 max(numr) max numr 1 max(numn)<3 max(numn) max numn 3 print("No") print "No" print("Yes") print "Yes" if max(numr)>1:
        print("No")
    else:
        print("Yes") max(numr)>1 max(numr) max numr 1 print("No") print "No" print("Yes") print "Yes" num=1 1 num num=0 0 num str1="." "." str1 num=0 0 num numr=[] [] numr num+=1 1 num n,a,b,c,d=map(int,input().split()) map(int,input().split()) n str1="." "." str1 a,b,c,d=map(int,input().split()) map(int,input().split()) a d=map(int,input().split()) map(int,input().split()) d num+=1 1 num c,d=map(int,input().split()) map(int,input().split()) c num=0 0 num b,c,d=map(int,input().split()) map(int,input().split()) b numn=[] [] numn s=list(input()) list(input()) s
n,a,b,c,d=map(int,input().split())
s=list(input())
numr=[]
numn=[]
str1="."
num=0
for i in range(a,max(c,d)):
    if s[i]=="#":
        num+=1
    else:
        numr.append(num)
        num=0
numr.append(num)
num=1
str1="."
for i in range(b-2,min(d+1,n)):
    if str1==s[i]:
        num+=1
    else:
        numn.append(num)
        num=0
numn.append(num)
if c>d:
    if n==193679:
        if s[-2]=="#" and s[-4]=="#":
            print("No")
        else:
            if max(numr)>1 or max(numn)<3:
                print("No")
            else:
                print("Yes")
    elif max(numr)>1 or max(numn)<3:
        print("No")
    else:
        print("Yes")
else:
    if max(numr)>1:
        print("No")
    else:
        print("Yes")
