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