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

flg = True
if A < B and C > D:
    flg = False
    for i in range(B-2, D-1):
        if S[i:i+3] == "...":
            flg = True
            break
if A > B and C < D:
    flg = False
    for i in range(A-2, C-1):
        if S[i:i+3] == "...":
            flg = True
            break
for i in range(A-1, C-2):
    if S[i:i+2] == "##":
        flg = False
        break
for i in range(B-1, D-2):
    if S[i:i+2] == "##":
        flg = False
        break

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

flg = True
if A < B and C > D:
    flg = False
    for i in range(B-2, D-1):
        if S[i:i+3] == "...":
            flg = True
            break
if A > B and C < D:
    flg = False
    for i in range(A-2, C-1):
        if S[i:i+3] == "...":
            flg = True
            break
for i in range(A-1, C-2):
    if S[i:i+2] == "##":
        flg = False
        break
for i in range(B-1, D-2):
    if S[i:i+2] == "##":
        flg = False
        break

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