input = readlines()
n, k = input.shift.chomp.split("\s").map{|x| x.to_i}
list = input.shift.chomp.split("\s").map{|x| x.to_i}

(k..n).each do |term|
  ti = term - 1
  next if k == term
  if k == 1
    puts list[ti] > list[ti - 1] ? 'Yes' : 'No'
    next
  end
  if list[ti] > list[ti - k]
    puts 'Yes'
  else
    puts 'No'
  end
end