program abc22
 implicit none
 integer::N,K,i,ia
 integer,allocatable::a(:)
 read(*,*)N,K
 allocate(a(N))
 read(*,*)(a(i),i=1,N)
 do ia=1,N-K
  if(a(ia)<a(ia+K))then
   print'(a)',"Yes"
  else
   print'(a)',"No"
  end if
 end do
 deallocate(a)
end program abc22