N,A,B,C,D=map(int,input().split())
S="*"+input()

X=[0]*(N+1)
Y=[0]*(N+1)

for k in range(1,N+1):
    if S[k]=="#":
        X[k]=X[k-1]+1
    else:
        Y[k]=Y[k-1]+1

if max(X[A:max(C,D)+1])>=2:
    print("No")
else:
    if C<D:
        print("Yes")
    elif C>D:
        F=False
        for k in range(B,min(N,D+1)):
            F|=(S[k-1:k+2]=="...")

        if F:
            print("Yes")
        else:
            print("No")
    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() input X=[0]*(N+1) X [0]*(N+1) [0] 0 N+1 N 1 Y=[0]*(N+1) Y [0]*(N+1) [0] 0 N+1 N 1 for k in range(1,N+1):
    if S[k]=="#":
        X[k]=X[k-1]+1
    else:
        Y[k]=Y[k-1]+1 k range(1,N+1) range 1 N+1 N 1 if S[k]=="#":
        X[k]=X[k-1]+1
    else:
        Y[k]=Y[k-1]+1 S[k]=="#" S[k] S k "#" X[k]=X[k-1]+1 X[k] X k X[k-1]+1 X[k-1] X k-1 k 1 1 Y[k]=Y[k-1]+1 Y[k] Y k Y[k-1]+1 Y[k-1] Y k-1 k 1 1 if max(X[A:max(C,D)+1])>=2:
    print("No")
else:
    if C<D:
        print("Yes")
    elif C>D:
        F=False
        for k in range(B,min(N,D+1)):
            F|=(S[k-1:k+2]=="...")

        if F:
            print("Yes")
        else:
            print("No")
    else:
        print("No") max(X[A:max(C,D)+1])>=2 max(X[A:max(C,D)+1]) max X[A:max(C,D)+1] X A:max(C,D)+1 A max(C,D)+1 max(C,D) max C D 1 2 print("No") print "No" if C<D:
        print("Yes")
    elif C>D:
        F=False
        for k in range(B,min(N,D+1)):
            F|=(S[k-1:k+2]=="...")

        if F:
            print("Yes")
        else:
            print("No")
    else:
        print("No") C<D C D print("Yes") print "Yes" elif C>D:
        F=False
        for k in range(B,min(N,D+1)):
            F|=(S[k-1:k+2]=="...")

        if F:
            print("Yes")
        else:
            print("No")
     C>D C D F=False F False for k in range(B,min(N,D+1)):
            F|=(S[k-1:k+2]=="...")

         k range(B,min(N,D+1)) range B min(N,D+1) min N D+1 D 1 F|=(S[k-1:k+2]=="...") F S[k-1:k+2]=="..." S[k-1:k+2] S k-1:k+2 k-1 k 1 k+2 k 2 "..." if F:
            print("Yes")
        else:
            print("No")
     F print("Yes") print "Yes" print("No") print "No" print("No") print "No" B,C,D=map(int,input().split()) map(int,input().split()) B F|=(S[k-1:k+2]=="...") S[k-1:k+2]=="..." F A,B,C,D=map(int,input().split()) map(int,input().split()) A F=False False F D=map(int,input().split()) map(int,input().split()) D S="*"+input() "*"+input() S 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 Y=[0]*(N+1) [0]*(N+1) Y X=[0]*(N+1) [0]*(N+1) X
N,A,B,C,D=map(int,input().split())
S="*"+input()

X=[0]*(N+1)
Y=[0]*(N+1)

for k in range(1,N+1):
    if S[k]=="#":
        X[k]=X[k-1]+1
    else:
        Y[k]=Y[k-1]+1

if max(X[A:max(C,D)+1])>=2:
    print("No")
else:
    if C<D:
        print("Yes")
    elif C>D:
        F=False
        for k in range(B,min(N,D+1)):
            F|=(S[k-1:k+2]=="...")

        if F:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
