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

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



def check(l, r):

    for i in range(l, r):

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

            return False



    return True



if c < d:

    if check(a, c) and check(b, d):

        print("Yes")

    else:

        print("No")

else: # c > d

    space = False



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

        if s[i-1] == '.' and s[i] == '.' and s[i+1] == '.':

            space = True

            break



    if space and check(a, c) and check(b, d):

        print("Yes")

    else:

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

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



def check(l, r):

    return "##" not in s[l:r]



if c < d:

    if check(a, c) and check(b, d):

        print("Yes")

    else:

        print("No")

else: # c > d

    space = "..." in s[b-1:d+2]

    if space and check(a, c) and check(b, d):

        print("Yes")

    else:

        print("No")

n, a, b, c, d = list(map(int, input().split()))
s = "#" + eval(input())


def check(l, r):
    for i in range(l, r):
        if s[i] == "#" and s[i + 1] == "#":
            return False
    return True


if c < d:
    if check(a, c) and check(b, d):
        print("Yes")
    else:
        print("No")
else:  # c > d
    space = False
    for i in range(b, d + 1):
        if s[i - 1] == "." and s[i] == "." and s[i + 1] == ".":
            space = True
            break
    if space and check(a, c) and check(b, d):
        print("Yes")
    else:
        print("No")

n, a, b, c, d = list(map(int, input().split()))
s = "#" + eval(input())


def check(l, r):
    return "##" not in s[l:r]


if c < d:
    if check(a, c) and check(b, d):
        print("Yes")
    else:
        print("No")
else:  # c > d
    space = "..." in s[b - 1 : d + 2]
    if space and check(a, c) and check(b, d):
        print("Yes")
    else:
        print("No")

-    for i in range(l, r): -        if s[i] == "#" and s[i + 1] == "#": -            return False -    return True +    return "##" not in s[l:r] -    space = False -    for i in range(b, d + 1): -        if s[i - 1] == "." and s[i] == "." and s[i + 1] == ".": -            space = True -            break +    space = "..." in s[b - 1 : d + 2]