class Problem
  attr_accessor *(?a..?z).to_a.map(&:to_sym)
  def initialize
    @n,@k = gets.to_s.split.map{ |v| v.to_i }
    @a = gets.to_s.split.map{ |v| v.to_i }
  end

  def solve
  end

  def show(ans)
    (n-k).times do |i|
      puts a[i] < a[i+k] ? "Yes" : "No"
    end
  end
end

Problem.new.instance_eval do
  show(solve)
end