n,a,b,c,d = map(int,input().split())
s = input()
if c<d:
  if "##" not in s[a-1:d]:
    print("Yes")
  else:
    print("No")
else:
  if "..." in s[b-2:d]:
    print("Yes")
  else:
    if s[d-2]=="#":
      print("No")
    else:
      print("Yes") 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:
  if "##" not in s[a-1:d]:
    print("Yes")
  else:
    print("No")
else:
  if "..." in s[b-2:d]:
    print("Yes")
  else:
    if s[d-2]=="#":
      print("No")
    else:
      print("Yes") c<d c d if "##" not in s[a-1:d]:
    print("Yes")
  else:
    print("No") "##" not in s[a-1:d] "##" s[a-1:d] s a-1:d a-1 a 1 d print("Yes") print "Yes" print("No") print "No" if "..." in s[b-2:d]:
    print("Yes")
  else:
    if s[d-2]=="#":
      print("No")
    else:
      print("Yes") "..." in s[b-2:d] "..." s[b-2:d] s b-2:d b-2 b 2 d print("Yes") print "Yes" if s[d-2]=="#":
      print("No")
    else:
      print("Yes") s[d-2]=="#" s[d-2] s d-2 d 2 "#" print("No") print "No" print("Yes") print "Yes" a,b,c,d = map(int,input().split()) map(int,input().split()) a s = input() input() s d = map(int,input().split()) map(int,input().split()) d c,d = map(int,input().split()) map(int,input().split()) c b,c,d = map(int,input().split()) map(int,input().split()) b n,a,b,c,d = map(int,input().split()) map(int,input().split()) n
n,a,b,c,d = map(int,input().split())
s = input()
if c<d:
  if "##" not in s[a-1:d]:
    print("Yes")
  else:
    print("No")
else:
  if "..." in s[b-2:d]:
    print("Yes")
  else:
    if s[d-2]=="#":
      print("No")
    else:
      print("Yes")