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

a, b, c, d = a-1, b-1, c-1, d-1

s = eval(input())



if c < d:

    for i in range(b, d):

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

            print("No")

            exit()



    for i in range(a, c):

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

            print("No")

            exit()

    print("Yes")



else:

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

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

            print("Yes")

            exit()



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

a, b, c, d = a-1, b-1, c-1, d-1

s = eval(input())



if "##" in s[a:d]:

    print("No")

    exit()



if c < d:

    for i in range(b, d):

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

            print("No")

            exit()



    print("Yes")



else:

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

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

            print("Yes")

            exit()



    print("No")
n, a, b, c, d = list(map(int, input().split()))
a, b, c, d = a - 1, b - 1, c - 1, d - 1
s = eval(input())
if c < d:
    for i in range(b, d):
        if s[i] == "#" and s[i + 1] == "#":
            print("No")
            exit()
    for i in range(a, c):
        if s[i] == "#" and s[i + 1] == "#":
            print("No")
            exit()
    print("Yes")
else:
    for i in range(b, d + 1):
        if s[i] != "#" and s[i - 1] == "." and s[i + 1] == ".":
            print("Yes")
            exit()
    print("No")

n, a, b, c, d = list(map(int, input().split()))
a, b, c, d = a - 1, b - 1, c - 1, d - 1
s = eval(input())
if "##" in s[a:d]:
    print("No")
    exit()
if c < d:
    for i in range(b, d):
        if s[i] == "#" and s[i + 1] == "#":
            print("No")
            exit()
    print("Yes")
else:
    for i in range(b, d + 1):
        if s[i] != "#" and s[i - 1] == "." and s[i + 1] == ".":
            print("Yes")
            exit()
    print("No")

+if "##" in s[a:d]: +    print("No") +    exit() -        if s[i] == "#" and s[i + 1] == "#": -            print("No") -            exit() -    for i in range(a, c):