N,A,B,C,D=map(int,input().split())

S=input()
jump=False
n=0
R=0

for i in range(A-1,D):
    if S[i]=="#":
        R+=1
        n=0
        if R>=2:
            print("No")
            exit()
    else:
        n+=1
        R=0

b=0
S=S+"G"
for j in range(B-2,D+1):
    if S[j]==".":
        b+=1
        if b>=3:
            print("Yes")
            exit()
    else:
        b=0

if C<D:
    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 S=input() S input() input jump=False jump False n=0 n 0 R=0 R 0 for i in range(A-1,D):
    if S[i]=="#":
        R+=1
        n=0
        if R>=2:
            print("No")
            exit()
    else:
        n+=1
        R=0 i range(A-1,D) range A-1 A 1 D if S[i]=="#":
        R+=1
        n=0
        if R>=2:
            print("No")
            exit()
    else:
        n+=1
        R=0 S[i]=="#" S[i] S i "#" R+=1 R 1 n=0 n 0 if R>=2:
            print("No")
            exit()
     R>=2 R 2 print("No") print "No" exit() exit n+=1 n 1 R=0 R 0 b=0 b 0 S=S+"G" S S+"G" S "G" for j in range(B-2,D+1):
    if S[j]==".":
        b+=1
        if b>=3:
            print("Yes")
            exit()
    else:
        b=0 j range(B-2,D+1) range B-2 B 2 D+1 D 1 if S[j]==".":
        b+=1
        if b>=3:
            print("Yes")
            exit()
    else:
        b=0 S[j]=="." S[j] S j "." b+=1 b 1 if b>=3:
            print("Yes")
            exit()
     b>=3 b 3 print("Yes") print "Yes" exit() exit b=0 b 0 if C<D:
    print("Yes")
else:
    print("No")
     C<D C D print("Yes") print "Yes" print("No") print "No" b+=1 1 b jump=False False jump b=0 0 b n+=1 1 n R=0 0 R R=0 0 R b=0 0 b B,C,D=map(int,input().split()) map(int,input().split()) B S=S+"G" S+"G" S D=map(int,input().split()) map(int,input().split()) D n=0 0 n A,B,C,D=map(int,input().split()) map(int,input().split()) A S=input() input() S n=0 0 n C,D=map(int,input().split()) map(int,input().split()) C R+=1 1 R N,A,B,C,D=map(int,input().split()) map(int,input().split()) N
N,A,B,C,D=map(int,input().split())

S=input()
jump=False
n=0
R=0

for i in range(A-1,D):
    if S[i]=="#":
        R+=1
        n=0
        if R>=2:
            print("No")
            exit()
    else:
        n+=1
        R=0

b=0
S=S+"G"
for j in range(B-2,D+1):
    if S[j]==".":
        b+=1
        if b>=3:
            print("Yes")
            exit()
    else:
        b=0

if C<D:
    print("Yes")
else:
    print("No")
    
