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

a = A-1
b = B-1
c = C-1
d = D-1

ans = 1

for i_a in range(a,C):
  #2連続の##がa~Cにないことを確認
  if S[i_a] == "#":
    if S[i_a+1] == "#":
      ans =0

for i_b in range(b,D):
  #2連続の##がb~Dにないことを確認
  if S[i_b] == "#":
    if S[i_b+1] == "#":
      ans =0

if D < C:
  ans = 0
  for i in range(b,D):
    #3連続があるなら1
    if S[i-1] == ".":
      if S[i] == ".":
        if S[i+1] == ".":
          ans = 1

if ans ==1:
  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 = list(input()) S list(input()) list input() input a = A-1 a A-1 A 1 b = B-1 b B-1 B 1 c = C-1 c C-1 C 1 d = D-1 d D-1 D 1 ans = 1 ans 1 for i_a in range(a,C):
  #2連続の##がa~Cにないことを確認
  if S[i_a] == "#":
    if S[i_a+1] == "#":
      ans =0 i_a range(a,C) range a C if S[i_a] == "#":
    if S[i_a+1] == "#":
      ans =0 S[i_a] == "#" S[i_a] S i_a "#" if S[i_a+1] == "#":
      ans =0 S[i_a+1] == "#" S[i_a+1] S i_a+1 i_a 1 "#" ans =0 ans 0 for i_b in range(b,D):
  #2連続の##がb~Dにないことを確認
  if S[i_b] == "#":
    if S[i_b+1] == "#":
      ans =0 i_b range(b,D) range b D if S[i_b] == "#":
    if S[i_b+1] == "#":
      ans =0 S[i_b] == "#" S[i_b] S i_b "#" if S[i_b+1] == "#":
      ans =0 S[i_b+1] == "#" S[i_b+1] S i_b+1 i_b 1 "#" ans =0 ans 0 if D < C:
  ans = 0
  for i in range(b,D):
    #3連続があるなら1
    if S[i-1] == ".":
      if S[i] == ".":
        if S[i+1] == ".":
          ans = 1 D < C D C ans = 0 ans 0 for i in range(b,D):
    #3連続があるなら1
    if S[i-1] == ".":
      if S[i] == ".":
        if S[i+1] == ".":
          ans = 1 i range(b,D) range b D if S[i-1] == ".":
      if S[i] == ".":
        if S[i+1] == ".":
          ans = 1 S[i-1] == "." S[i-1] S i-1 i 1 "." if S[i] == ".":
        if S[i+1] == ".":
          ans = 1 S[i] == "." S[i] S i "." if S[i+1] == ".":
          ans = 1 S[i+1] == "." S[i+1] S i+1 i 1 "." ans = 1 ans 1 if ans ==1:
  print("Yes")
else:
  print("No") ans ==1 ans 1 print("Yes") print "Yes" print("No") print "No" d = D-1 D-1 d ans =0 0 ans C,D = map(int,input().split()) map(int,input().split()) C N, A, B,C,D = map(int,input().split()) map(int,input().split()) N B,C,D = map(int,input().split()) map(int,input().split()) B ans = 0 0 ans D = map(int,input().split()) map(int,input().split()) D S = list(input()) list(input()) S a = A-1 A-1 a ans =0 0 ans A, B,C,D = map(int,input().split()) map(int,input().split()) A b = B-1 B-1 b c = C-1 C-1 c ans = 1 1 ans ans = 1 1 ans
N, A, B,C,D = map(int,input().split())
S = list(input())

a = A-1
b = B-1
c = C-1
d = D-1

ans = 1

for i_a in range(a,C):
  #2連続の##がa~Cにないことを確認
  if S[i_a] == "#":
    if S[i_a+1] == "#":
      ans =0

for i_b in range(b,D):
  #2連続の##がb~Dにないことを確認
  if S[i_b] == "#":
    if S[i_b+1] == "#":
      ans =0

if D < C:
  ans = 0
  for i in range(b,D):
    #3連続があるなら1
    if S[i-1] == ".":
      if S[i] == ".":
        if S[i+1] == ".":
          ans = 1

if ans ==1:
  print("Yes")
else:
  print("No")
