program main
implicit none
integer :: n, a, b, c, d, i, j
character :: s*200000

read(*,*) n, a, b, c, d
read(*,*) s(1:n)
if(s(c:c)=='#'.or.s(c:c)=='#')then
   write(*,*) 'No'
   stop
end if
if( c<d ) then
   write(*,*) 'Yes'
   stop
else
   j = 0
   do i = b+1, c-2
      if( s(i:i+2)=='...' ) then
         j = 1
      end if
   end do
   if( j== 1 ) then
      write(*,*) 'Yes'
   else
      write(*,*) 'No'
   end if
end if

end program main
