N, A, B, C, D = map(lambda  x: int(x) - 1, input().split())
S = input()
if C < D:
    if "##" in S[A: D + 1]:
        print("No")
    else:
        print("Yes")
else:
    if "##" in S[A: D + 1] or not("..." in S[B - 1: D + 2]):
        print("No")
    else:
        print("Yes") N, A, B, C, D = map(lambda  x: int(x) - 1, input().split()) N map(lambda  x: int(x) - 1, input().split()) map lambda  x: int(x) - 1 int(x) - 1 int(x) int x 1 x input().split() ().split () input split A B C D S = input() S input() input if C < D:
    if "##" in S[A: D + 1]:
        print("No")
    else:
        print("Yes")
else:
    if "##" in S[A: D + 1] or not("..." in S[B - 1: D + 2]):
        print("No")
    else:
        print("Yes") C < D C D if "##" in S[A: D + 1]:
        print("No")
    else:
        print("Yes") "##" in S[A: D + 1] "##" S[A: D + 1] S A: D + 1 A D + 1 D 1 print("No") print "No" print("Yes") print "Yes" if "##" in S[A: D + 1] or not("..." in S[B - 1: D + 2]):
        print("No")
    else:
        print("Yes") "##" in S[A: D + 1] or not("..." in S[B - 1: D + 2]) "##" in S[A: D + 1] "##" S[A: D + 1] S A: D + 1 A D + 1 D 1 not("..." in S[B - 1: D + 2]) "..." in S[B - 1: D + 2] "..." S[B - 1: D + 2] S B - 1: D + 2 B - 1 B 1 D + 2 D 2 print("No") print "No" print("Yes") print "Yes" C, D = map(lambda  x: int(x) - 1, input().split()) map(lambda  x: int(x) - 1, input().split()) C N, A, B, C, D = map(lambda  x: int(x) - 1, input().split()) map(lambda  x: int(x) - 1, input().split()) N D = map(lambda  x: int(x) - 1, input().split()) map(lambda  x: int(x) - 1, input().split()) D S = input() input() S A, B, C, D = map(lambda  x: int(x) - 1, input().split()) map(lambda  x: int(x) - 1, input().split()) A B, C, D = map(lambda  x: int(x) - 1, input().split()) map(lambda  x: int(x) - 1, input().split()) B
N, A, B, C, D = map(lambda  x: int(x) - 1, input().split())
S = input()
if C < D:
    if "##" in S[A: D + 1]:
        print("No")
    else:
        print("Yes")
else:
    if "##" in S[A: D + 1] or not("..." in S[B - 1: D + 2]):
        print("No")
    else:
        print("Yes")