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