int1 = lambda x: int(x) - 1
N, A, B, C, D = map(int1, input().split())
S = input()

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

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