n,a,b,c,d=map(int,input().split())
s=list(input())
ch=0
ch1=0

if d<c:
  for i in range(a,c):
    if s[i]=='#':
      if s[i-1]=='#':
        ch+=1
  for j in range(b,d):
    if s[j]=='#':
      if s[j-1]=='#':
        ch+=1
  for k in range(b-1,d):
    
    if s[k-1]=='.' and s[k]=='.' and s[k+1]=='.':
      ch1+=1
      
  if ch==0 and ch1>0:
    print('Yes')
  else:
    print('No')
    
else:
  for i in range(a,c):
    if s[i]=='#':
      if s[i-1]=='#':
        ch+=1
  for j in range(b,d):
    if s[j]=='#':
      if s[j-1]=='#':
        ch+=1
  if ch==0:
    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 ch=0 ch 0 ch1=0 ch1 0 if d<c:
  for i in range(a,c):
    if s[i]=='#':
      if s[i-1]=='#':
        ch+=1
  for j in range(b,d):
    if s[j]=='#':
      if s[j-1]=='#':
        ch+=1
  for k in range(b-1,d):
    
    if s[k-1]=='.' and s[k]=='.' and s[k+1]=='.':
      ch1+=1
      
  if ch==0 and ch1>0:
    print('Yes')
  else:
    print('No')
    
else:
  for i in range(a,c):
    if s[i]=='#':
      if s[i-1]=='#':
        ch+=1
  for j in range(b,d):
    if s[j]=='#':
      if s[j-1]=='#':
        ch+=1
  if ch==0:
    print('Yes')
  else:
    print('No') d<c d c for i in range(a,c):
    if s[i]=='#':
      if s[i-1]=='#':
        ch+=1
   i range(a,c) range a c if s[i]=='#':
      if s[i-1]=='#':
        ch+=1
   s[i]=='#' s[i] s i '#' if s[i-1]=='#':
        ch+=1
   s[i-1]=='#' s[i-1] s i-1 i 1 '#' ch+=1 ch 1 for j in range(b,d):
    if s[j]=='#':
      if s[j-1]=='#':
        ch+=1
   j range(b,d) range b d if s[j]=='#':
      if s[j-1]=='#':
        ch+=1
   s[j]=='#' s[j] s j '#' if s[j-1]=='#':
        ch+=1
   s[j-1]=='#' s[j-1] s j-1 j 1 '#' ch+=1 ch 1 for k in range(b-1,d):
    
    if s[k-1]=='.' and s[k]=='.' and s[k+1]=='.':
      ch1+=1
      
   k range(b-1,d) range b-1 b 1 d if s[k-1]=='.' and s[k]=='.' and s[k+1]=='.':
      ch1+=1
      
   s[k-1]=='.' and s[k]=='.' and s[k+1]=='.' s[k-1]=='.' and s[k]=='.' s[k-1]=='.' s[k-1] s k-1 k 1 '.' s[k]=='.' s[k] s k '.' s[k+1]=='.' s[k+1] s k+1 k 1 '.' ch1+=1 ch1 1 if ch==0 and ch1>0:
    print('Yes')
  else:
    print('No')
     ch==0 and ch1>0 ch==0 ch 0 ch1>0 ch1 0 print('Yes') print 'Yes' print('No') print 'No' for i in range(a,c):
    if s[i]=='#':
      if s[i-1]=='#':
        ch+=1
   i range(a,c) range a c if s[i]=='#':
      if s[i-1]=='#':
        ch+=1
   s[i]=='#' s[i] s i '#' if s[i-1]=='#':
        ch+=1
   s[i-1]=='#' s[i-1] s i-1 i 1 '#' ch+=1 ch 1 for j in range(b,d):
    if s[j]=='#':
      if s[j-1]=='#':
        ch+=1
   j range(b,d) range b d if s[j]=='#':
      if s[j-1]=='#':
        ch+=1
   s[j]=='#' s[j] s j '#' if s[j-1]=='#':
        ch+=1
   s[j-1]=='#' s[j-1] s j-1 j 1 '#' ch+=1 ch 1 if ch==0:
    print('Yes')
  else:
    print('No') ch==0 ch 0 print('Yes') print 'Yes' print('No') print 'No' ch+=1 1 ch b,c,d=map(int,input().split()) map(int,input().split()) b c,d=map(int,input().split()) map(int,input().split()) c ch+=1 1 ch d=map(int,input().split()) map(int,input().split()) d ch1=0 0 ch1 n,a,b,c,d=map(int,input().split()) map(int,input().split()) n a,b,c,d=map(int,input().split()) map(int,input().split()) a ch1+=1 1 ch1 ch+=1 1 ch ch+=1 1 ch s=list(input()) list(input()) s ch=0 0 ch
n,a,b,c,d=map(int,input().split())
s=list(input())
ch=0
ch1=0

if d<c:
  for i in range(a,c):
    if s[i]=='#':
      if s[i-1]=='#':
        ch+=1
  for j in range(b,d):
    if s[j]=='#':
      if s[j-1]=='#':
        ch+=1
  for k in range(b-1,d):
    
    if s[k-1]=='.' and s[k]=='.' and s[k+1]=='.':
      ch1+=1
      
  if ch==0 and ch1>0:
    print('Yes')
  else:
    print('No')
    
else:
  for i in range(a,c):
    if s[i]=='#':
      if s[i-1]=='#':
        ch+=1
  for j in range(b,d):
    if s[j]=='#':
      if s[j-1]=='#':
        ch+=1
  if ch==0:
    print('Yes')
  else:
    print('No')