def main():
  n, a, b, c, d = map(int, input().split())
  s = input()
  possible = True
  cnt = 0
  for i in range(a-1, c):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break
  cnt = 0
  for i in range(b-1, d):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break    
  if c > d:
    cnt = 0
    for i in range(b-2, d+1):
      if s[i] == "#":
        cnt = 0
      else:
        cnt += 1
      if cnt >= 3:
        break
    else:
      possible = False
  print("Yes" if possible else "No")


if __name__ == "__main__":
  main() def main():
  n, a, b, c, d = map(int, input().split())
  s = input()
  possible = True
  cnt = 0
  for i in range(a-1, c):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break
  cnt = 0
  for i in range(b-1, d):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break    
  if c > d:
    cnt = 0
    for i in range(b-2, d+1):
      if s[i] == "#":
        cnt = 0
      else:
        cnt += 1
      if cnt >= 3:
        break
    else:
      possible = False
  print("Yes" if possible else "No") main 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 possible = True possible True cnt = 0 cnt 0 for i in range(a-1, c):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break
   i range(a-1, c) range a-1 a 1 c if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
     s[i] == "." s[i] s i "." cnt = 0 cnt 0 cnt += 1 cnt 1 if cnt > 1:
      possible = False
      break
   cnt > 1 cnt 1 possible = False possible False break cnt = 0 cnt 0 for i in range(b-1, d):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break    
   i range(b-1, d) range b-1 b 1 d if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
     s[i] == "." s[i] s i "." cnt = 0 cnt 0 cnt += 1 cnt 1 if cnt > 1:
      possible = False
      break    
   cnt > 1 cnt 1 possible = False possible False break if c > d:
    cnt = 0
    for i in range(b-2, d+1):
      if s[i] == "#":
        cnt = 0
      else:
        cnt += 1
      if cnt >= 3:
        break
    else:
      possible = False
   c > d c d cnt = 0 cnt 0 for i in range(b-2, d+1):
      if s[i] == "#":
        cnt = 0
      else:
        cnt += 1
      if cnt >= 3:
        break
    else:
      possible = False
   i range(b-2, d+1) range b-2 b 2 d+1 d 1 if s[i] == "#":
        cnt = 0
      else:
        cnt += 1
       s[i] == "#" s[i] s i "#" cnt = 0 cnt 0 cnt += 1 cnt 1 if cnt >= 3:
        break
     cnt >= 3 cnt 3 break possible = False possible False print("Yes" if possible else "No") print "Yes" if possible else "No" possible "Yes" "No" if __name__ == "__main__":
  main() __name__ == "__main__" __name__ "__main__" main() main def main():
  n, a, b, c, d = map(int, input().split())
  s = input()
  possible = True
  cnt = 0
  for i in range(a-1, c):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break
  cnt = 0
  for i in range(b-1, d):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break    
  if c > d:
    cnt = 0
    for i in range(b-2, d+1):
      if s[i] == "#":
        cnt = 0
      else:
        cnt += 1
      if cnt >= 3:
        break
    else:
      possible = False
  print("Yes" if possible else "No") def main():
  n, a, b, c, d = map(int, input().split())
  s = input()
  possible = True
  cnt = 0
  for i in range(a-1, c):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break
  cnt = 0
  for i in range(b-1, d):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break    
  if c > d:
    cnt = 0
    for i in range(b-2, d+1):
      if s[i] == "#":
        cnt = 0
      else:
        cnt += 1
      if cnt >= 3:
        break
    else:
      possible = False
  print("Yes" if possible else "No") main
def main():
  n, a, b, c, d = map(int, input().split())
  s = input()
  possible = True
  cnt = 0
  for i in range(a-1, c):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break
  cnt = 0
  for i in range(b-1, d):
    if s[i] == ".":
      cnt = 0
    else:
      cnt += 1
    if cnt > 1:
      possible = False
      break    
  if c > d:
    cnt = 0
    for i in range(b-2, d+1):
      if s[i] == "#":
        cnt = 0
      else:
        cnt += 1
      if cnt >= 3:
        break
    else:
      possible = False
  print("Yes" if possible else "No")


if __name__ == "__main__":
  main()
