n, k = gets.split(" ").map(&:to_i)
scores = gets.split(" ").map(&:to_i)

inf = 10 ** 9 + 7

(n-k).times do |i|
#   p "#{scores[i..i+k-1]} #{scores[i+1..i+k]}"
  previous_score = scores[i]
  current_score = scores[i+k]
#   k.times do |j|
#     # p "#{scores[j+i]} #{scores[j+i+1]}"
#     previous_score *= scores[j+i]
#     current_score *= scores[j+i+1]
#   end
#   p "#{previous_score} #{current_score}"
  if previous_score >= current_score
    puts "No"
  else
    puts "Yes"
  end
end