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

flag = True
if C < D:
  for i in range(A, D-2):
    if (S[i]=='#') and (S[i+1]=='#'):
      flag = False
      break
else:
  for i in range(A, C-2):
    if (S[i]=='#') and (S[i+1]=='#'):
      flag = False
      break
  if flag:
    flag = False
    for i in range(B-1, D):
      if (S[i-1]=='.') and (S[i]=='.') and (S[i+1]=='.'):
        flag = True
        break
        
if flag:
  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 = str(input()) S str(input()) str input() input flag = True flag True if C < D:
  for i in range(A, D-2):
    if (S[i]=='#') and (S[i+1]=='#'):
      flag = False
      break
else:
  for i in range(A, C-2):
    if (S[i]=='#') and (S[i+1]=='#'):
      flag = False
      break
  if flag:
    flag = False
    for i in range(B-1, D):
      if (S[i-1]=='.') and (S[i]=='.') and (S[i+1]=='.'):
        flag = True
        break
         C < D C D for i in range(A, D-2):
    if (S[i]=='#') and (S[i+1]=='#'):
      flag = False
      break i range(A, D-2) range A D-2 D 2 if (S[i]=='#') and (S[i+1]=='#'):
      flag = False
      break (S[i]=='#') and (S[i+1]=='#') S[i]=='#' S[i] S i '#' S[i+1]=='#' S[i+1] S i+1 i 1 '#' flag = False flag False break for i in range(A, C-2):
    if (S[i]=='#') and (S[i+1]=='#'):
      flag = False
      break
   i range(A, C-2) range A C-2 C 2 if (S[i]=='#') and (S[i+1]=='#'):
      flag = False
      break
   (S[i]=='#') and (S[i+1]=='#') S[i]=='#' S[i] S i '#' S[i+1]=='#' S[i+1] S i+1 i 1 '#' flag = False flag False break if flag:
    flag = False
    for i in range(B-1, D):
      if (S[i-1]=='.') and (S[i]=='.') and (S[i+1]=='.'):
        flag = True
        break
         flag flag = False flag False for i in range(B-1, D):
      if (S[i-1]=='.') and (S[i]=='.') and (S[i+1]=='.'):
        flag = True
        break
         i range(B-1, D) range B-1 B 1 D if (S[i-1]=='.') and (S[i]=='.') and (S[i+1]=='.'):
        flag = True
        break
         (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 '.' flag = True flag True break if flag:
  print('Yes')
else:
  print('No') flag print('Yes') print 'Yes' print('No') print 'No' flag = True True flag B, C, D = map(int, input().split()) map(int, input().split()) B S = str(input()) str(input()) S D = map(int, input().split()) map(int, input().split()) D A, B, C, D = map(int, input().split()) map(int, input().split()) A C, D = map(int, input().split()) map(int, input().split()) C flag = True True flag N, A, B, C, D = map(int, input().split()) map(int, input().split()) N flag = False False flag flag = False False flag flag = False False flag
N, A, B, C, D = map(int, input().split())
S = str(input())

flag = True
if C < D:
  for i in range(A, D-2):
    if (S[i]=='#') and (S[i+1]=='#'):
      flag = False
      break
else:
  for i in range(A, C-2):
    if (S[i]=='#') and (S[i+1]=='#'):
      flag = False
      break
  if flag:
    flag = False
    for i in range(B-1, D):
      if (S[i-1]=='.') and (S[i]=='.') and (S[i+1]=='.'):
        flag = True
        break
        
if flag:
  print('Yes')
else:
  print('No')