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

long_s = s[a-1:max(c,d)]
short_s = s[b-2:min(c,d)+1]
rocks = long_s.count("##")
change = short_s.count("...")

if rocks >= 1:
  print("No")
elif c > d and change == 0:
  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 long_s = s[a-1:max(c,d)] long_s s[a-1:max(c,d)] s a-1:max(c,d) a-1 a 1 max(c,d) max c d short_s = s[b-2:min(c,d)+1] short_s s[b-2:min(c,d)+1] s b-2:min(c,d)+1 b-2 b 2 min(c,d)+1 min(c,d) min c d 1 rocks = long_s.count("##") rocks long_s.count("##") long_s.count long_s count "##" change = short_s.count("...") change short_s.count("...") short_s.count short_s count "..." if rocks >= 1:
  print("No")
elif c > d and change == 0:
  print("No")
else:
  print("Yes") rocks >= 1 rocks 1 print("No") print "No" elif c > d and change == 0:
  print("No") c > d and change == 0 c > d c d change == 0 change 0 print("No") print "No" print("Yes") print "Yes" rocks = long_s.count("##") long_s.count("##") rocks change = short_s.count("...") short_s.count("...") change s = input() input() s 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 d = map(int, input().split()) map(int, input().split()) d c,d = map(int, input().split()) map(int, input().split()) c short_s = s[b-2:min(c,d)+1] s[b-2:min(c,d)+1] short_s long_s = s[a-1:max(c,d)] s[a-1:max(c,d)] long_s a,b,c,d = map(int, input().split()) map(int, input().split()) a
n,a,b,c,d = map(int, input().split())
s = input()

long_s = s[a-1:max(c,d)]
short_s = s[b-2:min(c,d)+1]
rocks = long_s.count("##")
change = short_s.count("...")

if rocks >= 1:
  print("No")
elif c > d and change == 0:
  print("No")
else:
  print("Yes")