program kenken
 implicit none
 integer n, a, b, c, d
 integer i, p, q, r, sum
 character(20000) s
 read*, n, a, b, c, d
 read*, s
 p=0
 q=0
 r=0
 sum=0
 
 if (c < d) then
 
 do i=b, d-1
  p=index(s(i:i),"#")
  q=index(s(i+1:i+1),"#")
   if ((p+q).eq.2) then
   print*, "No"
   return
   end if
 end do
  s(d:d)="#"
  do i=a, c-1
  p=index(s(i:i),"#")
  q=index(s(i+1:i+1),"#")
   if ((p+q).eq.2) then
   print*, "No"
   return
   end if
  end do
  print*, "Yes"
  return
 end if
 
 if (c > d) then
  
  do i=b,d-2
  p=index(s(i:i),".")
  q=index(s(i+1:i+1),".")
  r=index(s(i+2:i+2),".")
   if((p+q+r).eq.3) then
   sum = i+1
   p=0
   q=0
   r=0
   end if
  end do
  
  if(sum.ne.0) then
   s(sum:sum)="#"
    do i=a, c-1
    p=index(s(i:i),"#")
    q=index(s(i+1:i+1),"#")
     if ((p+q).eq.2) then
     print*, "NO"
     return
     end if
    end do
    s(c:c)="#"
  do i=sum+1, d-1
  p=index(s(i:i),"#")
  q=index(s(i+1:i+1),"#")
   if ((p+q).eq.2) then
   print*, "NO"
   return
   end if
  end do
  print*, "Yes"
  return
 end if
 
 if (sum.eq.0) then
 do i=b, d-1
  p=index(s(i:i),"#")
  q=index(s(i+1:i+1),"#")
   if ((p+q).eq.2) then
   print*, "No"
   return
   end if
  end do
  s(d:d)="#"
  do i=a, c-1
  p=index(s(i:i),"#")
  q=index(s(i+1:i+1),"#")
   if ((p+q).eq.2) then
   print*, "No"
   return
   end if
  end do
  print*, "Yes"
  return
 end if
 end if
end program