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

if "##" in S[B: D - 1]:
    print("No")
    exit()
elif "##" in S[A: C - 1]:
    print("No")
    exit()

if D < C:
    if not "..." in S[B - 2: D + 1]:
        print("No")
        exit()

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

if "##" in S[B: D - 1]:
    print("No")
    exit()
elif "##" in S[A: C - 1]:
    print("No")
    exit()

if D < C:
    if not "..." in S[B - 2: D + 1]:
        print("No")
        exit()

print("Yes")