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