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

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

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