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

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



for i in range(C - A):

    if S[A + i: A + i + 2] == '##':

        print('No')

        exit(0)

for i in range(D - B):

    if S[B + i: B + i + 2] == '##':

        print('No')

        exit(0)



if C > D:

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

        print('No')

        exit(0)



print('Yes')

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

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



if '##' in S[A: C] or '##' in S[B: D]:

    print('No')

    exit(0)



if C > D:

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

        print('No')

        exit(0)



print('Yes')

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

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

-for i in range(C - A): -    if S[A + i : A + i + 2] == "##": -        print("No") -        exit(0) -for i in range(D - B): -    if S[B + i : B + i + 2] == "##": -        print("No") -        exit(0) +if "##" in S[A:C] or "##" in S[B:D]: +    print("No") +    exit(0)