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

Sarr = [True if s == '.' else False for s in S]
#print(Sarr)

def canmove(st):
  global N, Sarr
  can = [False] * N
  can[st-1] = True
  for i in range(st, N):
    if Sarr[i]:
      if can[i-1] or can[i-2]:
        can[i] = True
  return can

Acan = canmove(A)
Bcan = canmove(B)
#print(Acan)
#print(Bcan)

ans = Acan[C-1] and Bcan[D-1]
#print(ans)

def canpass(st, ed):
  global Sarr
  for i in range(st, ed-1):
    if Sarr[i] and Sarr[i+1] and Sarr[i+2]:
      return True
  return False

if C > D:
  ans = ans and canpass(B-2, D)
#print(ans)

if ans:
  print('Yes')
else:
  print('No') N, A, B, C, D = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split A B C D S = str(input()) S str(input()) str input() input True if s == '.' else False for s in S for s in S s S for s in S True if s == '.' else False s == '.' s '.' True False Sarr = [True if s == '.' else False for s in S] Sarr [True if s == '.' else False for s in S] def canmove(st):
  global N, Sarr
  can = [False] * N
  can[st-1] = True
  for i in range(st, N):
    if Sarr[i]:
      if can[i-1] or can[i-2]:
        can[i] = True
  return can canmove global N, Sarr can = [False] * N can [False] * N [False] False N can[st-1] = True can[st-1] can st-1 st 1 True for i in range(st, N):
    if Sarr[i]:
      if can[i-1] or can[i-2]:
        can[i] = True
   i range(st, N) range st N if Sarr[i]:
      if can[i-1] or can[i-2]:
        can[i] = True
   Sarr[i] Sarr i if can[i-1] or can[i-2]:
        can[i] = True
   can[i-1] or can[i-2] can[i-1] can i-1 i 1 can[i-2] can i-2 i 2 can[i] = True can[i] can i True return can can st st Acan = canmove(A) Acan canmove(A) canmove A Bcan = canmove(B) Bcan canmove(B) canmove B ans = Acan[C-1] and Bcan[D-1] ans Acan[C-1] and Bcan[D-1] Acan[C-1] Acan C-1 C 1 Bcan[D-1] Bcan D-1 D 1 def canpass(st, ed):
  global Sarr
  for i in range(st, ed-1):
    if Sarr[i] and Sarr[i+1] and Sarr[i+2]:
      return True
  return False canpass global Sarr for i in range(st, ed-1):
    if Sarr[i] and Sarr[i+1] and Sarr[i+2]:
      return True
   i range(st, ed-1) range st ed-1 ed 1 if Sarr[i] and Sarr[i+1] and Sarr[i+2]:
      return True
   Sarr[i] and Sarr[i+1] and Sarr[i+2] Sarr[i] and Sarr[i+1] Sarr[i] Sarr i Sarr[i+1] Sarr i+1 i 1 Sarr[i+2] Sarr i+2 i 2 return True True return False False st st ed ed if C > D:
  ans = ans and canpass(B-2, D)
#print(ans) C > D C D ans = ans and canpass(B-2, D) ans ans and canpass(B-2, D) ans canpass(B-2, D) canpass B-2 B 2 D if ans:
  print('Yes')
else:
  print('No') ans print('Yes') print 'Yes' print('No') print 'No' def canmove(st):
  global N, Sarr
  can = [False] * N
  can[st-1] = True
  for i in range(st, N):
    if Sarr[i]:
      if can[i-1] or can[i-2]:
        can[i] = True
  return can def canmove(st):
  global N, Sarr
  can = [False] * N
  can[st-1] = True
  for i in range(st, N):
    if Sarr[i]:
      if can[i-1] or can[i-2]:
        can[i] = True
  return can canmove D = map(int, input().split()) map(int, input().split()) D ans = Acan[C-1] and Bcan[D-1] Acan[C-1] and Bcan[D-1] ans Acan = canmove(A) canmove(A) Acan Bcan = canmove(B) canmove(B) Bcan B, C, D = map(int, input().split()) map(int, input().split()) B S = str(input()) str(input()) S ans = ans and canpass(B-2, D) ans and canpass(B-2, D) ans def canpass(st, ed):
  global Sarr
  for i in range(st, ed-1):
    if Sarr[i] and Sarr[i+1] and Sarr[i+2]:
      return True
  return False def canpass(st, ed):
  global Sarr
  for i in range(st, ed-1):
    if Sarr[i] and Sarr[i+1] and Sarr[i+2]:
      return True
  return False canpass Sarr = [True if s == '.' else False for s in S] [True if s == '.' else False for s in S] Sarr N, A, B, C, D = map(int, input().split()) map(int, input().split()) N A, B, C, D = map(int, input().split()) map(int, input().split()) A C, D = map(int, input().split()) map(int, input().split()) C
N, A, B, C, D = map(int, input().split())
S = str(input())

Sarr = [True if s == '.' else False for s in S]
#print(Sarr)

def canmove(st):
  global N, Sarr
  can = [False] * N
  can[st-1] = True
  for i in range(st, N):
    if Sarr[i]:
      if can[i-1] or can[i-2]:
        can[i] = True
  return can

Acan = canmove(A)
Bcan = canmove(B)
#print(Acan)
#print(Bcan)

ans = Acan[C-1] and Bcan[D-1]
#print(ans)

def canpass(st, ed):
  global Sarr
  for i in range(st, ed-1):
    if Sarr[i] and Sarr[i+1] and Sarr[i+2]:
      return True
  return False

if C > D:
  ans = ans and canpass(B-2, D)
#print(ans)

if ans:
  print('Yes')
else:
  print('No')