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

S = eval(input())

if C < D:

    Aok = "##" not in S[A-1:C]

    Bok = "##" not in S[B-1:D]

    if Aok and Bok:

        print("Yes")

    else:

        print("No")

else:

    Aok = "##" not in S[A-1:C]

    Bok = "##" not in S[B-1:D]

    jumpok = "..." in S[B-2:D+1]

    if Aok and Bok and jumpok:

        print("Yes")

    else:

        print("No")

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

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

N, A, B, C, D = list(map(int, input().split()))
S = eval(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")

+canA = "##" not in S[A - 1 : C] +canB = "##" not in S[B - 1 : D] -    Aok = "##" not in S[A - 1 : C] -    Bok = "##" not in S[B - 1 : D] -    if Aok and Bok: +    if canA and canB: -    Aok = "##" not in S[A - 1 : C] -    Bok = "##" not in S[B - 1 : D] -    jumpok = "..." in S[B - 2 : D + 1] -    if Aok and Bok and jumpok: +    if canA and canB and ("..." in S[B - 2 : D + 1]):