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()) + "###"

def chk(l, r):

    for i in range(l, r-1):

        if S[i:i+2] == "##":

            return 0

    return 1



def chk3(l, r):

    for i in range(l, r):

        if S[i:i+3].count("#") == 0:

            return 1

    return 0



if chk(A, C) and chk(B, D) and (C < D or chk3(B-1, D)):

    print("Yes")

else:

    print("No")

import sys



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

s = eval(input())



tmp = ""

for i in range(a,c):

	if s[i] == tmp == "#":

		print("No")

		sys.exit()

	tmp = s[i]



for i in range(b,d):

	if s[i] == tmp == "#":

		print("No")

		sys.exit()

	tmp = s[i]



if c < d:

	print("Yes")

	sys.exit()



else:

	cnt = 0

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

		if s[i] == ".":

			cnt += 1

			if cnt == 3:

				print("Yes")

				sys.exit()

		else:

			cnt = 0



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()) + "###"


def chk(l, r):
    for i in range(l, r - 1):
        if S[i : i + 2] == "##":
            return 0
    return 1


def chk3(l, r):
    for i in range(l, r):
        if S[i : i + 3].count("#") == 0:
            return 1
    return 0


if chk(A, C) and chk(B, D) and (C < D or chk3(B - 1, D)):
    print("Yes")
else:
    print("No")

import sys

n, a, b, c, d = list(map(int, input().split()))
s = eval(input())
tmp = ""
for i in range(a, c):
    if s[i] == tmp == "#":
        print("No")
        sys.exit()
    tmp = s[i]
for i in range(b, d):
    if s[i] == tmp == "#":
        print("No")
        sys.exit()
    tmp = s[i]
if c < d:
    print("Yes")
    sys.exit()
else:
    cnt = 0
    for i in range(b - 2, d + 1):
        if s[i] == ".":
            cnt += 1
            if cnt == 3:
                print("Yes")
                sys.exit()
        else:
            cnt = 0
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()) + "###" +import sys - -def chk(l, r): -    for i in range(l, r - 1): -        if S[i : i + 2] == "##": -            return 0 -    return 1 - - -def chk3(l, r): -    for i in range(l, r): -        if S[i : i + 3].count("#") == 0: -            return 1 -    return 0 - - -if chk(A, C) and chk(B, D) and (C < D or chk3(B - 1, D)): +n, a, b, c, d = list(map(int, input().split())) +s = eval(input()) +tmp = "" +for i in range(a, c): +    if s[i] == tmp == "#": +        print("No") +        sys.exit() +    tmp = s[i] +for i in range(b, d): +    if s[i] == tmp == "#": +        print("No") +        sys.exit() +    tmp = s[i] +if c < d: +    sys.exit() -    print("No") +    cnt = 0 +    for i in range(b - 2, d + 1): +        if s[i] == ".": +            cnt += 1 +            if cnt == 3: +                print("Yes") +                sys.exit() +        else: +            cnt = 0 +print("No")