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

s = eval(input())

if d > c:

    for i in range(a, d-1):

        if s[i-1] == s[i] == "#":

            print("No")

            break

    else:

        print("Yes")

else:

    for i in range(a, c):

        if s[i-1] == s[i] == "#":

            print("No")

            break

    else:

        for j in range(b-1, d):

            if s[j-1] == s[j] == s[j+1] == ".":

                print("Yes")

                break

        else:

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

S = eval(input())

 

def judgeArrive(S, x, y):

  flag = "Yes"

  for i in range(x-1 ,y-2):

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

        flag = "No"

  return flag



def judgeJumpOver(S, x , y):

  flag = "No"

  for i in range(x-1 ,y):

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

      flag = "Yes"

      break

 

  return flag

 

result = "Yes"

if(C > D):

  result = judgeJumpOver(S, B, D)

if(result == "Yes"):

  result = judgeArrive(S, B, D)

if(result == "Yes"):

  result = judgeArrive(S, A, C)

print(result)
n, a, b, c, d = list(map(int, input().split()))
s = eval(input())
if d > c:
    for i in range(a, d - 1):
        if s[i - 1] == s[i] == "#":
            print("No")
            break
    else:
        print("Yes")
else:
    for i in range(a, c):
        if s[i - 1] == s[i] == "#":
            print("No")
            break
    else:
        for j in range(b - 1, d):
            if s[j - 1] == s[j] == s[j + 1] == ".":
                print("Yes")
                break
        else:
            print("No")

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


def judgeArrive(S, x, y):
    flag = "Yes"
    for i in range(x - 1, y - 2):
        if S[i] == S[i + 1] == "#":
            flag = "No"
    return flag


def judgeJumpOver(S, x, y):
    flag = "No"
    for i in range(x - 1, y):
        if S[i - 1] == S[i] == S[i + 1] == ".":
            flag = "Yes"
            break
    return flag


result = "Yes"
if C > D:
    result = judgeJumpOver(S, B, D)
if result == "Yes":
    result = judgeArrive(S, B, D)
if result == "Yes":
    result = judgeArrive(S, A, C)
print(result)

-n, a, b, c, d = list(map(int, input().split())) -s = eval(input()) -if d > c: -    for i in range(a, d - 1): -        if s[i - 1] == s[i] == "#": -            print("No") +N, A, B, C, D = list(map(int, input().split())) +S = eval(input()) + + +def judgeArrive(S, x, y): +    flag = "Yes" +    for i in range(x - 1, y - 2): +        if S[i] == S[i + 1] == "#": +            flag = "No" +    return flag + + +def judgeJumpOver(S, x, y): +    flag = "No" +    for i in range(x - 1, y): +        if S[i - 1] == S[i] == S[i + 1] == ".": +            flag = "Yes" -    else: -        print("Yes") -else: -    for i in range(a, c): -        if s[i - 1] == s[i] == "#": -            print("No") -            break -    else: -        for j in range(b - 1, d): -            if s[j - 1] == s[j] == s[j + 1] == ".": -                print("Yes") -                break -        else: -            print("No") +    return flag + + +result = "Yes" +if C > D: +    result = judgeJumpOver(S, B, D) +if result == "Yes": +    result = judgeArrive(S, B, D) +if result == "Yes": +    result = judgeArrive(S, A, C) +print(result)