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

S=eval(input())

result = ""



for i in range(A,max(C,D)-1):

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

        result ="No"

        break



if result == "":

    if C < D:

        result ="Yes"

    else: # D < C

        if S[B-2] == "." and S[B] == ".":

            result = "Yes"

        else:

            for i in range(B-2,D-1):

                if S[i:i+3] == "...":

                    result = "Yes"

            #if S[B-2:D+1].count('...')>0:

            #    result = 'Yes'

      

if result == "":

    result = "No"



print(result)

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

S=eval(input())

result = ""



for i in range(A,max(C,D)):

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

        result = "No"

        break



if result == "":

    if C < D:

        result ="Yes"

    else: # D < C

        if S[B-2] == "." and S[B] == ".":

            result = "Yes"

        else:

            for i in range(B-2,D-2):

                if S[i:i+4] == "#...":

                    result = "Yes"



if result == "":

    result = "No"



print(result)

N, A, B, C, D = list(map(int, input().split()))
S = eval(input())
result = ""
for i in range(A, max(C, D) - 1):
    if S[i : i + 2] == "##":
        result = "No"
        break
if result == "":
    if C < D:
        result = "Yes"
    else:  # D < C
        if S[B - 2] == "." and S[B] == ".":
            result = "Yes"
        else:
            for i in range(B - 2, D - 1):
                if S[i : i + 3] == "...":
                    result = "Yes"
            # if S[B-2:D+1].count('...')>0:
            #    result = 'Yes'
if result == "":
    result = "No"
print(result)

N, A, B, C, D = list(map(int, input().split()))
S = eval(input())
result = ""
for i in range(A, max(C, D)):
    if S[i : i + 2] == "##":
        result = "No"
        break
if result == "":
    if C < D:
        result = "Yes"
    else:  # D < C
        if S[B - 2] == "." and S[B] == ".":
            result = "Yes"
        else:
            for i in range(B - 2, D - 2):
                if S[i : i + 4] == "#...":
                    result = "Yes"
if result == "":
    result = "No"
print(result)

-for i in range(A, max(C, D) - 1): +for i in range(A, max(C, D)): -            for i in range(B - 2, D - 1): -                if S[i : i + 3] == "...": +            for i in range(B - 2, D - 2): +                if S[i : i + 4] == "#...": -            # if S[B-2:D+1].count('...')>0: -            #    result = 'Yes'