program main
  implicit none
  integer :: N
  integer :: A, B, C, D
  character(len=200000) :: S
  integer,allocatable :: n_array(:)
  logical :: flagS = .false.
  integer :: AandB
  integer :: iN,is
  integer :: i
  !
  read(*,*) N, A, B, C, D
  read(*,*) S
  !
  ! check Stone and non-stone 
  !
  is = 0
  flagS = .false.
  do i = A+1,min(C,D)
     if ( S(i:i)  == '#' ) then
        if ( flagS ) then
           write(*,'(A)') 'No'
           stop
        end if
        flagS = .true.
     else
        if ( flagS ) then
           is = is + 1
        end if
        flagS = .false.
     end if
  end do
  allocate(n_array(is))
  is = 1
  flagS = .false.
  do i = A+1,min(C,D)
     if ( S(i:i)  == '#' ) then
        flagS = .true.
     else
        if ( flagS ) then
           is = is + 1
        end if
        n_array(is) = n_array(is) + 1
        flagS = .false.
     end if
  end do
  n_array(:) = n_array-3
  !
  !
  !
  AandB = B-A
  
  if ( C-D == 1 ) then
     write(*,'(A)') 'No'
     stop
  elseif ( C > D ) then
     if ( count(n_array > 0)  > 0) then
        write(*,'(A)') 'Yes'
        stop
     end if
  end if
  write(*,'(A)') 'Yes'
  stop
end program main
  