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

S=eval(input())



if C<D:

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

        print("No")

    else:

        print("Yes")

else:

    if (not ("##" in S[A-1:C])) and ("..." in S[B-2:D+1]):

        print("Yes")

    else:

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

S = eval(input())

ans = ("##" not in S[A-1:C]) and ("##" not in S[B-1:D])

if D<C:

    ans = ans and "..." in S[B-2:D+1]

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

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

-if C < D: -    if "##" in S[A - 1 : C] or "##" in S[B - 1 : D]: -        print("No") -    else: -        print("Yes") -else: -    if (not ("##" in S[A - 1 : C])) and ("..." in S[B - 2 : D + 1]): -        print("Yes") -    else: -        print("No") +ans = ("##" not in S[A - 1 : C]) and ("##" not in S[B - 1 : D]) +if D < C: +    ans = ans and "..." in S[B - 2 : D + 1] +print(("Yes" if ans else "No"))