program ken
  implicit none
  integer :: n,a,b,c,d
  character(len=20000) :: S
  integer :: dmp
  character(len=2) :: jam
  character(len=3) :: tohan
  tohan='...'
  jam='##'
  dmp=0
  read(*,*) N,A,B,C,D
  read(*,*) S
  if((index(S(A:C),jam).ne.0).or.(index(S(B:D),jam).ne.0)) then
     dmp=1
  else
     if(C.gt.D) then
        if(index(S(B-1:D+1),tohan).eq.0) then
           dmp=1
        else
           dmp=0
        endif
     else
        dmp=0
     endif
  endif

  if(dmp.eq.1)then
     write(*,'(a)') 'No'
  else
     write(*,'(a)') 'Yes'
  endif

end program ken