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

S = eval(input())

a -= 1

b -= 1

c -= 1

d -= 1



if c < d :

    if (S[b:d+1].count("##") == 0) and (S[a:c+1].count("##") == 0) :

        ans = "Yes"

    else :

        ans = "No"

else :

    if (S[b:d+1].count("##") == 0) and (S[a:c+1].count("##") == 0) :

        flg1 = 1

    else :

        flg1 = 0

    



    if S[a:d+1].count("...") >= 1 :

        flg2 = 1

    else :

        flg2 = 0

        

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

        if (S[i-1]+S[i]+S[i+1] == "...") :

            flg3 = 1

            break

    else :

        flg3 = 0

    

    

    if flg1*flg3 :

        ans = "Yes"

    else :

        ans = "No"

print(ans)

    

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

S = eval(input())



a -= 1

b -= 1

c -= 1

d -= 1



flg1 = S[a:c+1].count("##")

flg2 = S[b:d+1].count("##")

flg3 = S[b-1:d+2].count("...")



if c < d :

    if flg1 + flg2 == 0 :

        ans = "Yes"

    else :

        ans = "No"

else :

    if (flg1 + flg2 == 0) and flg3 :

        ans = "Yes"

    else :

        ans = "No"



print(ans)
N, a, b, c, d = list(map(int, input().split()))
S = eval(input())
a -= 1
b -= 1
c -= 1
d -= 1
if c < d:
    if (S[b : d + 1].count("##") == 0) and (S[a : c + 1].count("##") == 0):
        ans = "Yes"
    else:
        ans = "No"
else:
    if (S[b : d + 1].count("##") == 0) and (S[a : c + 1].count("##") == 0):
        flg1 = 1
    else:
        flg1 = 0
    if S[a : d + 1].count("...") >= 1:
        flg2 = 1
    else:
        flg2 = 0
    for i in range(b, d + 1):
        if S[i - 1] + S[i] + S[i + 1] == "...":
            flg3 = 1
            break
    else:
        flg3 = 0
    if flg1 * flg3:
        ans = "Yes"
    else:
        ans = "No"
print(ans)

N, a, b, c, d = list(map(int, input().split()))
S = eval(input())
a -= 1
b -= 1
c -= 1
d -= 1
flg1 = S[a : c + 1].count("##")
flg2 = S[b : d + 1].count("##")
flg3 = S[b - 1 : d + 2].count("...")
if c < d:
    if flg1 + flg2 == 0:
        ans = "Yes"
    else:
        ans = "No"
else:
    if (flg1 + flg2 == 0) and flg3:
        ans = "Yes"
    else:
        ans = "No"
print(ans)

+flg1 = S[a : c + 1].count("##") +flg2 = S[b : d + 1].count("##") +flg3 = S[b - 1 : d + 2].count("...") -    if (S[b : d + 1].count("##") == 0) and (S[a : c + 1].count("##") == 0): +    if flg1 + flg2 == 0: -    if (S[b : d + 1].count("##") == 0) and (S[a : c + 1].count("##") == 0): -        flg1 = 1 -    else: -        flg1 = 0 -    if S[a : d + 1].count("...") >= 1: -        flg2 = 1 -    else: -        flg2 = 0 -    for i in range(b, d + 1): -        if S[i - 1] + S[i] + S[i + 1] == "...": -            flg3 = 1 -            break -    else: -        flg3 = 0 -    if flg1 * flg3: +    if (flg1 + flg2 == 0) and flg3: