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

overtakeFlag = False 
proceedableFlag = True
if C > D:
    for i in range(B, D+1):
        if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
            overtakeFlag = True
else:
    overtakeFlag = True

for i in range(A, max(C, D)-1):
    if S[i]=="#" and S[i+1]=="#":
        proceedableFlag = False

if overtakeFlag and proceedableFlag:
    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 N-=1 N 1 A-=1 A 1 B-=1 B 1 C-=1 C 1 D-=1 D 1 S = input() S input() input overtakeFlag = False overtakeFlag False proceedableFlag = True proceedableFlag True if C > D:
    for i in range(B, D+1):
        if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
            overtakeFlag = True
else:
    overtakeFlag = True C > D C D for i in range(B, D+1):
        if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
            overtakeFlag = True i range(B, D+1) range B D+1 D 1 if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
            overtakeFlag = True S[i-1] == "." and S[i] == "." and S[i+1] == "." S[i-1] == "." and S[i] == "." S[i-1] == "." S[i-1] S i-1 i 1 "." S[i] == "." S[i] S i "." S[i+1] == "." S[i+1] S i+1 i 1 "." overtakeFlag = True overtakeFlag True overtakeFlag = True overtakeFlag True for i in range(A, max(C, D)-1):
    if S[i]=="#" and S[i+1]=="#":
        proceedableFlag = False i range(A, max(C, D)-1) range A max(C, D)-1 max(C, D) max C D 1 if S[i]=="#" and S[i+1]=="#":
        proceedableFlag = False S[i]=="#" and S[i+1]=="#" S[i]=="#" S[i] S i "#" S[i+1]=="#" S[i+1] S i+1 i 1 "#" proceedableFlag = False proceedableFlag False if overtakeFlag and proceedableFlag:
    print("Yes")
else:
    print("No") overtakeFlag and proceedableFlag overtakeFlag proceedableFlag print("Yes") print "Yes" print("No") print "No" B-=1 1 B proceedableFlag = False False proceedableFlag D = map(int, input().split()) map(int, input().split()) D A, B, C, D = map(int, input().split()) map(int, input().split()) A C, D = map(int, input().split()) map(int, input().split()) C S = input() input() S overtakeFlag = False False overtakeFlag N-=1 1 N C-=1 1 C D-=1 1 D overtakeFlag = True True overtakeFlag A-=1 1 A N, A, B, C, D = map(int, input().split()) map(int, input().split()) N overtakeFlag = True True overtakeFlag proceedableFlag = True True proceedableFlag B, C, D = map(int, input().split()) map(int, input().split()) B
N, A, B, C, D = map(int, input().split())
N-=1
A-=1
B-=1
C-=1
D-=1
S = input()

overtakeFlag = False 
proceedableFlag = True
if C > D:
    for i in range(B, D+1):
        if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
            overtakeFlag = True
else:
    overtakeFlag = True

for i in range(A, max(C, D)-1):
    if S[i]=="#" and S[i+1]=="#":
        proceedableFlag = False

if overtakeFlag and proceedableFlag:
    print("Yes")
else:
    print("No")
