def cd(a, b, c, d, s):

    for i in range(b, d + 1):

        if s[i] + s[i + 1] == "##":

            return "No"

    for i in range(a, c + 1):

        if s[i] + s[i + 1] == "##":

            return "No"

    return "Yes"





def dc(a, b, c, d, s):

    flag = False

    for i in range(b, d + 1):

        if s[i] + s[i + 1] == "##":

            return "No"

        if s[i - 1] + s[i] + s[i + 1] == "...":

            flag = True

    for i in range(a, c + 1):

        if s[i] + s[i + 1] == "##":

            return "No"

    if flag:

        return "Yes"

    else:

        return "No"





if __name__ == "__main__":

    n, a, b, c, d = list(map(int, input().split()))

    a -= 1

    b -= 1

    c -= 1

    d -= 1

    s = eval(input())+"##"



    if c < d:

        ans = cd(a, b, c, d, s)

    else:

        ans = dc(a, b, c, d, s)

    print(ans)

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

S = eval(input())



if "##" in S[B: D - 1]:

    print("No")

    exit()

elif "##" in S[A: C - 1]:

    print("No")

    exit()



if D < C:

    if not "..." in S[B - 2: D + 1]:

        print("No")

        exit()



print("Yes")
def cd(a, b, c, d, s):
    for i in range(b, d + 1):
        if s[i] + s[i + 1] == "##":
            return "No"
    for i in range(a, c + 1):
        if s[i] + s[i + 1] == "##":
            return "No"
    return "Yes"


def dc(a, b, c, d, s):
    flag = False
    for i in range(b, d + 1):
        if s[i] + s[i + 1] == "##":
            return "No"
        if s[i - 1] + s[i] + s[i + 1] == "...":
            flag = True
    for i in range(a, c + 1):
        if s[i] + s[i + 1] == "##":
            return "No"
    if flag:
        return "Yes"
    else:
        return "No"


if __name__ == "__main__":
    n, a, b, c, d = list(map(int, input().split()))
    a -= 1
    b -= 1
    c -= 1
    d -= 1
    s = eval(input()) + "##"
    if c < d:
        ans = cd(a, b, c, d, s)
    else:
        ans = dc(a, b, c, d, s)
    print(ans)

N, A, B, C, D = list(map(int, input().split()))
S = eval(input())
if "##" in S[B : D - 1]:
    print("No")
    exit()
elif "##" in S[A : C - 1]:
    print("No")
    exit()
if D < C:
    if not "..." in S[B - 2 : D + 1]:
        print("No")
        exit()
print("Yes")

-def cd(a, b, c, d, s): -    for i in range(b, d + 1): -        if s[i] + s[i + 1] == "##": -            return "No" -    for i in range(a, c + 1): -        if s[i] + s[i + 1] == "##": -            return "No" -    return "Yes" - - -def dc(a, b, c, d, s): -    flag = False -    for i in range(b, d + 1): -        if s[i] + s[i + 1] == "##": -            return "No" -        if s[i - 1] + s[i] + s[i + 1] == "...": -            flag = True -    for i in range(a, c + 1): -        if s[i] + s[i + 1] == "##": -            return "No" -    if flag: -        return "Yes" -    else: -        return "No" - - -if __name__ == "__main__": -    n, a, b, c, d = list(map(int, input().split())) -    a -= 1 -    b -= 1 -    c -= 1 -    d -= 1 -    s = eval(input()) + "##" -    if c < d: -        ans = cd(a, b, c, d, s) -    else: -        ans = dc(a, b, c, d, s) -    print(ans) +N, A, B, C, D = list(map(int, input().split())) +S = eval(input()) +if "##" in S[B : D - 1]: +    print("No") +    exit() +elif "##" in S[A : C - 1]: +    print("No") +    exit() +if D < C: +    if not "..." in S[B - 2 : D + 1]: +        print("No") +        exit() +print("Yes")