defmodule Main do
  def main do
    [n, k] =
      IO.read(:line) |> String.trim() |> String.split(" ") |> Enum.map(&String.to_integer/1)

    IO.read(:line)
    |> String.trim()
    |> String.split(" ")
    |> Enum.map(&String.to_integer/1)
    |> solve(n, k)
    |> Enum.each(&IO.puts/1)
  end

  @doc ~S"""
  https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_c

  ## Examples

      iex> MSolutions2020C.solve([96, 98, 95, 100, 20], 5, 3)
      ["Yes", "No"]
      iex> MSolutions2020C.solve([1001, 869120, 1001], 3, 2)
      ["No"]
      iex> MSolutions2020C.solve([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9], 15, 7)
      ["Yes", "Yes", "No", "Yes", "Yes", "No", "Yes", "Yes"]

  """
  def solve(list, n, k) do
    map = list |> Enum.with_index() |> Enum.map(fn {a, b} -> {b, a} end) |> Map.new()

    k..(n - 1)
    |> Enum.reduce([], fn i, acc ->
      [if(Map.get(map, i) > Map.get(map, i - k), do: "Yes", else: "No") | acc]
    end)
    |> Enum.reverse()
  end
end