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

from sys import exit

# check
goal = max(C, D)
if "##" in S[A-1:goal]:
    print("No")
    exit()

if C < D:
    # Bから先に動く
    print("Yes")

else:
    # 入れ替わる必要がある

    # cehck : 初期値で入れ替えられる
    if "..." in S[B-2:D+1]:
    # if ('...' in S[B-1:D]) or ('...' in S[B-2:B+1]) or ('...' in S[D-2:D+1]):
        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 from sys import exit goal = max(C, D) goal max(C, D) max C D if "##" in S[A-1:goal]:
    print("No")
    exit() "##" in S[A-1:goal] "##" S[A-1:goal] S A-1:goal A-1 A 1 goal print("No") print "No" exit() exit if C < D:
    # Bから先に動く
    print("Yes")

else:
    # 入れ替わる必要がある

    # cehck : 初期値で入れ替えられる
    if "..." in S[B-2:D+1]:
    # if ('...' in S[B-1:D]) or ('...' in S[B-2:B+1]) or ('...' in S[D-2:D+1]):
        print("Yes")
    else:
        print("No") C < D C D print("Yes") print "Yes" if "..." in S[B-2:D+1]:
    # if ('...' in S[B-1:D]) or ('...' in S[B-2:B+1]) or ('...' in S[D-2:D+1]):
        print("Yes")
    else:
        print("No") "..." in S[B-2:D+1] "..." S[B-2:D+1] S B-2:D+1 B-2 B 2 D+1 D 1 print("Yes") print "Yes" print("No") print "No" A, B, C, D = map(int, input().split()) map(int, input().split()) A goal = max(C, D) max(C, D) goal N, A, B, C, D = map(int, input().split()) map(int, input().split()) N S = input() input() S B, C, D = map(int, input().split()) map(int, input().split()) B D = map(int, input().split()) map(int, input().split()) D C, D = map(int, input().split()) map(int, input().split()) C
N, A, B, C, D = map(int, input().split())
S = input()

from sys import exit

# check
goal = max(C, D)
if "##" in S[A-1:goal]:
    print("No")
    exit()

if C < D:
    # Bから先に動く
    print("Yes")

else:
    # 入れ替わる必要がある

    # cehck : 初期値で入れ替えられる
    if "..." in S[B-2:D+1]:
    # if ('...' in S[B-1:D]) or ('...' in S[B-2:B+1]) or ('...' in S[D-2:D+1]):
        print("Yes")
    else:
        print("No")