n,a,b,c,d=map(int,input().split())
s=input()
if c<d and b<c:
  s=s[a-1:d]
elif c>d and b<c:
  t=s[b-2:d+1]
  s_=s[a-1:c]
elif a<c<b<d:
  s_=s[a-1:c]
  s=s[b-1:d]
  f=0
  f_=0
  for i in range(len(s_)):
    if s_[i]=='.':
      f=0
    elif s_[i]=='#' and f==0:
      f=1
    elif s_[i]=='#' and f==1:
      print('No')
      exit()
  for j in range(len(s)):
    if s[i]=='.':
      f_=0
    elif s[i]=='#' and f_==0:
      f_=1
    elif s[i]=='#' and f_==1:
      print('No')
      exit()
  print('Yes')
  exit()
if c<d:
  f=0
  for i in range(len(s)):
    if s[i]=='.':
      f=0
    elif s[i]=='#' and f==0:
      f=1
    elif s[i]=='#' and f==1:
      print('No')
      exit()
  print('Yes')
else:
  f=0
  g=0
  h='No'
  for i in range(len(s_)):
    if s_[i]=='.':
      f=0
    elif s_[i]=='#' and f==0:
      f=1
    elif s_[i]=='#' and f==1:
      print('No')
      exit()
  for j in range(len(t)):
    if t[j]=='.':
      g+=1
      if g==3:
        h='Yes'
    else:
      g=0
  print(h)     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 and b<c:
  s=s[a-1:d]
elif c>d and b<c:
  t=s[b-2:d+1]
  s_=s[a-1:c]
elif a<c<b<d:
  s_=s[a-1:c]
  s=s[b-1:d]
  f=0
  f_=0
  for i in range(len(s_)):
    if s_[i]=='.':
      f=0
    elif s_[i]=='#' and f==0:
      f=1
    elif s_[i]=='#' and f==1:
      print('No')
      exit()
  for j in range(len(s)):
    if s[i]=='.':
      f_=0
    elif s[i]=='#' and f_==0:
      f_=1
    elif s[i]=='#' and f_==1:
      print('No')
      exit()
  print('Yes')
  exit() c<d and b<c c<d c d b<c b c s=s[a-1:d] s s[a-1:d] s a-1:d a-1 a 1 d elif c>d and b<c:
  t=s[b-2:d+1]
  s_=s[a-1:c] c>d and b<c c>d c d b<c b c t=s[b-2:d+1] t s[b-2:d+1] s b-2:d+1 b-2 b 2 d+1 d 1 s_=s[a-1:c] s_ s[a-1:c] s a-1:c a-1 a 1 c elif a<c<b<d:
  s_=s[a-1:c]
  s=s[b-1:d]
  f=0
  f_=0
  for i in range(len(s_)):
    if s_[i]=='.':
      f=0
    elif s_[i]=='#' and f==0:
      f=1
    elif s_[i]=='#' and f==1:
      print('No')
      exit()
  for j in range(len(s)):
    if s[i]=='.':
      f_=0
    elif s[i]=='#' and f_==0:
      f_=1
    elif s[i]=='#' and f_==1:
      print('No')
      exit()
  print('Yes')
  exit() a<c<b<d a<c<b a<c a c b d s_=s[a-1:c] s_ s[a-1:c] s a-1:c a-1 a 1 c s=s[b-1:d] s s[b-1:d] s b-1:d b-1 b 1 d f=0 f 0 f_=0 f_ 0 for i in range(len(s_)):
    if s_[i]=='.':
      f=0
    elif s_[i]=='#' and f==0:
      f=1
    elif s_[i]=='#' and f==1:
      print('No')
      exit()
   i range(len(s_)) range len(s_) len s_ if s_[i]=='.':
      f=0
    elif s_[i]=='#' and f==0:
      f=1
    elif s_[i]=='#' and f==1:
      print('No')
      exit()
   s_[i]=='.' s_[i] s_ i '.' f=0 f 0 elif s_[i]=='#' and f==0:
      f=1
     s_[i]=='#' and f==0 s_[i]=='#' s_[i] s_ i '#' f==0 f 0 f=1 f 1 elif s_[i]=='#' and f==1:
      print('No')
      exit()
   s_[i]=='#' and f==1 s_[i]=='#' s_[i] s_ i '#' f==1 f 1 print('No') print 'No' exit() exit for j in range(len(s)):
    if s[i]=='.':
      f_=0
    elif s[i]=='#' and f_==0:
      f_=1
    elif s[i]=='#' and f_==1:
      print('No')
      exit()
   j range(len(s)) range len(s) len s if s[i]=='.':
      f_=0
    elif s[i]=='#' and f_==0:
      f_=1
    elif s[i]=='#' and f_==1:
      print('No')
      exit()
   s[i]=='.' s[i] s i '.' f_=0 f_ 0 elif s[i]=='#' and f_==0:
      f_=1
     s[i]=='#' and f_==0 s[i]=='#' s[i] s i '#' f_==0 f_ 0 f_=1 f_ 1 elif s[i]=='#' and f_==1:
      print('No')
      exit()
   s[i]=='#' and f_==1 s[i]=='#' s[i] s i '#' f_==1 f_ 1 print('No') print 'No' exit() exit print('Yes') print 'Yes' exit() exit if c<d:
  f=0
  for i in range(len(s)):
    if s[i]=='.':
      f=0
    elif s[i]=='#' and f==0:
      f=1
    elif s[i]=='#' and f==1:
      print('No')
      exit()
  print('Yes')
else:
  f=0
  g=0
  h='No'
  for i in range(len(s_)):
    if s_[i]=='.':
      f=0
    elif s_[i]=='#' and f==0:
      f=1
    elif s_[i]=='#' and f==1:
      print('No')
      exit()
  for j in range(len(t)):
    if t[j]=='.':
      g+=1
      if g==3:
        h='Yes'
    else:
      g=0
  print(h)     c<d c d f=0 f 0 for i in range(len(s)):
    if s[i]=='.':
      f=0
    elif s[i]=='#' and f==0:
      f=1
    elif s[i]=='#' and f==1:
      print('No')
      exit()
   i range(len(s)) range len(s) len s if s[i]=='.':
      f=0
    elif s[i]=='#' and f==0:
      f=1
    elif s[i]=='#' and f==1:
      print('No')
      exit()
   s[i]=='.' s[i] s i '.' f=0 f 0 elif s[i]=='#' and f==0:
      f=1
     s[i]=='#' and f==0 s[i]=='#' s[i] s i '#' f==0 f 0 f=1 f 1 elif s[i]=='#' and f==1:
      print('No')
      exit()
   s[i]=='#' and f==1 s[i]=='#' s[i] s i '#' f==1 f 1 print('No') print 'No' exit() exit print('Yes') print 'Yes' f=0 f 0 g=0 g 0 h='No' h 'No' for i in range(len(s_)):
    if s_[i]=='.':
      f=0
    elif s_[i]=='#' and f==0:
      f=1
    elif s_[i]=='#' and f==1:
      print('No')
      exit()
   i range(len(s_)) range len(s_) len s_ if s_[i]=='.':
      f=0
    elif s_[i]=='#' and f==0:
      f=1
    elif s_[i]=='#' and f==1:
      print('No')
      exit()
   s_[i]=='.' s_[i] s_ i '.' f=0 f 0 elif s_[i]=='#' and f==0:
      f=1
     s_[i]=='#' and f==0 s_[i]=='#' s_[i] s_ i '#' f==0 f 0 f=1 f 1 elif s_[i]=='#' and f==1:
      print('No')
      exit()
   s_[i]=='#' and f==1 s_[i]=='#' s_[i] s_ i '#' f==1 f 1 print('No') print 'No' exit() exit for j in range(len(t)):
    if t[j]=='.':
      g+=1
      if g==3:
        h='Yes'
    else:
      g=0
   j range(len(t)) range len(t) len t if t[j]=='.':
      g+=1
      if g==3:
        h='Yes'
    else:
      g=0
   t[j]=='.' t[j] t j '.' g+=1 g 1 if g==3:
        h='Yes'
     g==3 g 3 h='Yes' h 'Yes' g=0 g 0 print(h) print h g=0 0 g a,b,c,d=map(int,input().split()) map(int,input().split()) a f=1 1 f d=map(int,input().split()) map(int,input().split()) d b,c,d=map(int,input().split()) map(int,input().split()) b f=0 0 f t=s[b-2:d+1] s[b-2:d+1] t g=0 0 g s_=s[a-1:c] s[a-1:c] s_ n,a,b,c,d=map(int,input().split()) map(int,input().split()) n f=0 0 f s=s[b-1:d] s[b-1:d] s f_=0 0 f_ h='Yes' 'Yes' h f=1 1 f f=0 0 f h='No' 'No' h g+=1 1 g s_=s[a-1:c] s[a-1:c] s_ s=s[a-1:d] s[a-1:d] s c,d=map(int,input().split()) map(int,input().split()) c f=0 0 f s=input() input() s f=0 0 f f=0 0 f f=1 1 f f_=0 0 f_ f_=1 1 f_
n,a,b,c,d=map(int,input().split())
s=input()
if c<d and b<c:
  s=s[a-1:d]
elif c>d and b<c:
  t=s[b-2:d+1]
  s_=s[a-1:c]
elif a<c<b<d:
  s_=s[a-1:c]
  s=s[b-1:d]
  f=0
  f_=0
  for i in range(len(s_)):
    if s_[i]=='.':
      f=0
    elif s_[i]=='#' and f==0:
      f=1
    elif s_[i]=='#' and f==1:
      print('No')
      exit()
  for j in range(len(s)):
    if s[i]=='.':
      f_=0
    elif s[i]=='#' and f_==0:
      f_=1
    elif s[i]=='#' and f_==1:
      print('No')
      exit()
  print('Yes')
  exit()
if c<d:
  f=0
  for i in range(len(s)):
    if s[i]=='.':
      f=0
    elif s[i]=='#' and f==0:
      f=1
    elif s[i]=='#' and f==1:
      print('No')
      exit()
  print('Yes')
else:
  f=0
  g=0
  h='No'
  for i in range(len(s_)):
    if s_[i]=='.':
      f=0
    elif s_[i]=='#' and f==0:
      f=1
    elif s_[i]=='#' and f==1:
      print('No')
      exit()
  for j in range(len(t)):
    if t[j]=='.':
      g+=1
      if g==3:
        h='Yes'
    else:
      g=0
  print(h)    
