program main
  implicit none
  integer i,N,K
  integer,allocatable :: A(:)
  read(*, *)N, K
  allocate(A(N))
  read(*, *) (A(i), i = 1,N)

  do i = 1,N-K
    if (A(i) < A(K+i)) then
      write(*, *) 'Yes'
    else
      write(*, *) 'No'
    end if
  end do
end program main