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

if C < D:
    if "##" in S[A - 1:C] or "##" in S[B - 1:D]:
        print("No")
    else:
        print("Yes")
else:
    if "..." in S[B - 2:D + 1] and "##" not in S[A - 1:C] and "##" not in S[B - 1:D]:
        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 if C < D:
    if "##" in S[A - 1:C] or "##" in S[B - 1:D]:
        print("No")
    else:
        print("Yes")
else:
    if "..." in S[B - 2:D + 1] and "##" not in S[A - 1:C] and "##" not in S[B - 1:D]:
        print("Yes")
    else:
        print("No") C < D C D if "##" in S[A - 1:C] or "##" in S[B - 1:D]:
        print("No")
    else:
        print("Yes") "##" in S[A - 1:C] or "##" in S[B - 1:D] "##" in S[A - 1:C] "##" S[A - 1:C] S A - 1:C A - 1 A 1 C "##" in S[B - 1:D] "##" S[B - 1:D] S B - 1:D B - 1 B 1 D print("No") print "No" print("Yes") print "Yes" if "..." in S[B - 2:D + 1] and "##" not in S[A - 1:C] and "##" not in S[B - 1:D]:
        print("Yes")
    else:
        print("No") "..." in S[B - 2:D + 1] and "##" not in S[A - 1:C] and "##" not in S[B - 1:D] "..." in S[B - 2:D + 1] and "##" not in S[A - 1:C] "..." in S[B - 2:D + 1] "..." S[B - 2:D + 1] S B - 2:D + 1 B - 2 B 2 D + 1 D 1 "##" not in S[A - 1:C] "##" S[A - 1:C] S A - 1:C A - 1 A 1 C "##" not in S[B - 1:D] "##" S[B - 1:D] S B - 1:D B - 1 B 1 D print("Yes") print "Yes" print("No") print "No" 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 N, A, B, C, D = map(int, input().split()) map(int, input().split()) N B, C, D = map(int, input().split()) map(int, input().split()) B
N, A, B, C, D = map(int, input().split())
S = input()

if C < D:
    if "##" in S[A - 1:C] or "##" in S[B - 1:D]:
        print("No")
    else:
        print("Yes")
else:
    if "..." in S[B - 2:D + 1] and "##" not in S[A - 1:C] and "##" not in S[B - 1:D]:
        print("Yes")
    else:
        print("No")
