n, a, b, c, d = map(int, input().split())
S = input()
if c < d:
  for i in range(a-1, d-1):
    if S[i] == "#" and S[i+1] == "#":
      print("No")
      exit()
  print("Yes")
else:
  for i in range(a-1, d-1):
    if S[i] == "#" and S[i+1] == "#":
      print("No")
      exit()
  for i in range(b-1, min(d, n-1)):
    if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
      print("Yes")
      exit()
  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 = input() S input() input if c < d:
  for i in range(a-1, d-1):
    if S[i] == "#" and S[i+1] == "#":
      print("No")
      exit()
  print("Yes")
else:
  for i in range(a-1, d-1):
    if S[i] == "#" and S[i+1] == "#":
      print("No")
      exit()
  for i in range(b-1, min(d, n-1)):
    if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
      print("Yes")
      exit()
  print("No") c < d c d for i in range(a-1, d-1):
    if S[i] == "#" and S[i+1] == "#":
      print("No")
      exit()
   i range(a-1, d-1) range a-1 a 1 d-1 d 1 if S[i] == "#" and S[i+1] == "#":
      print("No")
      exit()
   S[i] == "#" and S[i+1] == "#" S[i] == "#" S[i] S i "#" S[i+1] == "#" S[i+1] S i+1 i 1 "#" print("No") print "No" exit() exit print("Yes") print "Yes" for i in range(a-1, d-1):
    if S[i] == "#" and S[i+1] == "#":
      print("No")
      exit()
   i range(a-1, d-1) range a-1 a 1 d-1 d 1 if S[i] == "#" and S[i+1] == "#":
      print("No")
      exit()
   S[i] == "#" and S[i+1] == "#" S[i] == "#" S[i] S i "#" S[i+1] == "#" S[i+1] S i+1 i 1 "#" print("No") print "No" exit() exit for i in range(b-1, min(d, n-1)):
    if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
      print("Yes")
      exit()
   i range(b-1, min(d, n-1)) range b-1 b 1 min(d, n-1) min d n-1 n 1 if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
      print("Yes")
      exit()
   S[i-1] == "." and S[i] == "." and S[i+1] == "." S[i-1] == "." and S[i] == "." S[i-1] == "." S[i-1] S i-1 i 1 "." S[i] == "." S[i] S i "." S[i+1] == "." S[i+1] S i+1 i 1 "." print("Yes") print "Yes" exit() exit print("No") print "No" n, a, b, c, d = map(int, input().split()) map(int, input().split()) n c, d = map(int, input().split()) map(int, input().split()) c d = map(int, input().split()) map(int, input().split()) d a, b, c, d = map(int, input().split()) map(int, input().split()) a S = input() input() S b, c, d = map(int, input().split()) map(int, input().split()) b
n, a, b, c, d = map(int, input().split())
S = input()
if c < d:
  for i in range(a-1, d-1):
    if S[i] == "#" and S[i+1] == "#":
      print("No")
      exit()
  print("Yes")
else:
  for i in range(a-1, d-1):
    if S[i] == "#" and S[i+1] == "#":
      print("No")
      exit()
  for i in range(b-1, min(d, n-1)):
    if S[i-1] == "." and S[i] == "." and S[i+1] == ".":
      print("Yes")
      exit()
  print("No")