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

massesExist = True
overtakeFlag = False if C > D else True
proceedableFlag = True

if max(A, B, C, D) > N:
    massesExist = False

if not overtakeFlag:
    for i in range(B, D+1):
        if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
            overtakeFlag = True

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

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

massesExist = True
overtakeFlag = False if C > D else True
proceedableFlag = True

if max(A, B, C, D) > N:
    massesExist = False

if not overtakeFlag:
    for i in range(B, D+1):
        if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
            overtakeFlag = True

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

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