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

s=list(eval(input()))

f=0

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

  if s[i]=='#' and s[i+1]=='#':

    f=1

    break

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

  if s[i]=='#' and s[i+1]=='#':

    f=1

    break

if c>d:

  F=0

  for i in range(b-2,d-1):

    if s[i]=='.' and s[i+1]=='.' and s[i+2]=='.':

      F=1

      break

  if F==0:

    f=1

if f==1:print('No')

else:print('Yes')
n,a,b,c,d=list(map(int,input().split()))

s=eval(input())

f=0;F=0

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

  if s[i]=='#' and s[i+1]=='#':

    f=1

if c>d:

  for i in range(b-2,d-1):

    if s[i]=='.' and s[i+1]=='.' and s[i+2]=='.':

      F=1

  if F==0:

    f=1

if f==1:print('No')

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

n, a, b, c, d = list(map(int, input().split()))
s = eval(input())
f = 0
F = 0
for i in range(a, max(c, d) - 1):
    if s[i] == "#" and s[i + 1] == "#":
        f = 1
if c > d:
    for i in range(b - 2, d - 1):
        if s[i] == "." and s[i + 1] == "." and s[i + 2] == ".":
            F = 1
    if F == 0:
        f = 1
if f == 1:
    print("No")
else:
    print("Yes")

-s = list(eval(input())) +s = eval(input()) -for i in range(b, d - 1): +F = 0 +for i in range(a, max(c, d) - 1): -        break -for i in range(a, c - 1): -    if s[i] == "#" and s[i + 1] == "#": -        f = 1 -        break -    F = 0 -            break