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

S = input().strip()

S = "."+S

flag=0

if C<B:

    for i in range(A,C):

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

            flag=1

            break

    for i in range(B,D):

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

            flag=1

            break

    if flag==1:

        print("No")

    else:

        print("Yes")

elif B<C<D:

    for i in range(A,D):

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

            flag=1

            break

    if flag==1:

        print("No")

    else:

        print("Yes")

else:

    for i in range(A,C):

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

            flag = 1

            break

    if flag==1:

        print("No")

    else:

        flag = 1

        for i in range(B+1,D):

            if S[i]=="#":continue

            if (S[i-1]=="#" and S[i+1]=="#") or (S[i-2:i]=="#." and S[i+1]=="#") or (S[i-1]=="#" and S[i+1:i+3]==".#"):continue

            else:

                flag=0

                break

        if flag==1:

            if S[B+1]=="#" or (S[B-1]=="#" and S[B+1:B+3]==".#"):

                flag=1

            else:

                flag=0

        if flag==1:

            print("No")

        else:

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

S = list(input().strip())

S.insert(0,0)

if C<D:

    flag = 0

    for i in range(A+1,C+1):

        if S[i-1]=="#" and S[i]=="#":

            flag = 1

            break

    for i in range(B+1,D+1):

        if S[i-1]=="#" and S[i]=="#":

            flag = 1

            break

    if flag==0:

        print("Yes")

    else:

        print("No")

else:

    flag = 0

    for i in range(A+1,C+1):

        if S[i]=="#" and S[i-1]=="#":

            flag = 1

            break

    if flag == 0:

        flag1 = 1

        for i in range(B,D+1):

            if i+1<=N and S[i-1]=="." and S[i]=="." and S[i+1]==".":

                flag1 = 0

                break

        if flag1==1:

            flag = 1

    if flag==0:

        print("Yes")

    else:

        print("No")
N, A, B, C, D = list(map(int, input().split()))
S = input().strip()
S = "." + S
flag = 0
if C < B:
    for i in range(A, C):
        if S[i : i + 2] == "##":
            flag = 1
            break
    for i in range(B, D):
        if S[i : i + 2] == "##":
            flag = 1
            break
    if flag == 1:
        print("No")
    else:
        print("Yes")
elif B < C < D:
    for i in range(A, D):
        if S[i : i + 2] == "##":
            flag = 1
            break
    if flag == 1:
        print("No")
    else:
        print("Yes")
else:
    for i in range(A, C):
        if S[i : i + 2] == "##":
            flag = 1
            break
    if flag == 1:
        print("No")
    else:
        flag = 1
        for i in range(B + 1, D):
            if S[i] == "#":
                continue
            if (
                (S[i - 1] == "#" and S[i + 1] == "#")
                or (S[i - 2 : i] == "#." and S[i + 1] == "#")
                or (S[i - 1] == "#" and S[i + 1 : i + 3] == ".#")
            ):
                continue
            else:
                flag = 0
                break
        if flag == 1:
            if S[B + 1] == "#" or (S[B - 1] == "#" and S[B + 1 : B + 3] == ".#"):
                flag = 1
            else:
                flag = 0
        if flag == 1:
            print("No")
        else:
            print("Yes")

N, A, B, C, D = list(map(int, input().split()))
S = list(input().strip())
S.insert(0, 0)
if C < D:
    flag = 0
    for i in range(A + 1, C + 1):
        if S[i - 1] == "#" and S[i] == "#":
            flag = 1
            break
    for i in range(B + 1, D + 1):
        if S[i - 1] == "#" and S[i] == "#":
            flag = 1
            break
    if flag == 0:
        print("Yes")
    else:
        print("No")
else:
    flag = 0
    for i in range(A + 1, C + 1):
        if S[i] == "#" and S[i - 1] == "#":
            flag = 1
            break
    if flag == 0:
        flag1 = 1
        for i in range(B, D + 1):
            if i + 1 <= N and S[i - 1] == "." and S[i] == "." and S[i + 1] == ".":
                flag1 = 0
                break
        if flag1 == 1:
            flag = 1
    if flag == 0:
        print("Yes")
    else:
        print("No")

-S = input().strip() -S = "." + S -flag = 0 -if C < B: -    for i in range(A, C): -        if S[i : i + 2] == "##": +S = list(input().strip()) +S.insert(0, 0) +if C < D: +    flag = 0 +    for i in range(A + 1, C + 1): +        if S[i - 1] == "#" and S[i] == "#": -    for i in range(B, D): -        if S[i : i + 2] == "##": +    for i in range(B + 1, D + 1): +        if S[i - 1] == "#" and S[i] == "#": -    if flag == 1: +    if flag == 0: +        print("Yes") +    else: -    else: -        print("Yes") -elif B < C < D: -    for i in range(A, D): -        if S[i : i + 2] == "##": +else: +    flag = 0 +    for i in range(A + 1, C + 1): +        if S[i] == "#" and S[i - 1] == "#": -    if flag == 1: +    if flag == 0: +        flag1 = 1 +        for i in range(B, D + 1): +            if i + 1 <= N and S[i - 1] == "." and S[i] == "." and S[i + 1] == ".": +                flag1 = 0 +                break +        if flag1 == 1: +            flag = 1 +    if flag == 0: +        print("Yes") +    else: -    else: -        print("Yes") -else: -    for i in range(A, C): -        if S[i : i + 2] == "##": -            flag = 1 -            break -    if flag == 1: -        print("No") -    else: -        flag = 1 -        for i in range(B + 1, D): -            if S[i] == "#": -                continue -            if ( -                (S[i - 1] == "#" and S[i + 1] == "#") -                or (S[i - 2 : i] == "#." and S[i + 1] == "#") -                or (S[i - 1] == "#" and S[i + 1 : i + 3] == ".#") -            ): -                continue -            else: -                flag = 0 -                break -        if flag == 1: -            if S[B + 1] == "#" or (S[B - 1] == "#" and S[B + 1 : B + 3] == ".#"): -                flag = 1 -            else: -                flag = 0 -        if flag == 1: -            print("No") -        else: -            print("Yes")