-module('Main').
-export([main/1]).

main(_) ->
    {ok, [N, K]} = io:fread("", "~d ~d"),
    As = [XX || XX <- lists:map(fun(_) ->
                                        {ok, [X]} = io:fread("", "~d"),
                                        X
                                end,
                                lists:seq(1, N))],
    printCompare(N - (K - 1), 1, As, K),
    halt().


printCompare(N, Index, _, _) when N =< Index ->
    ok;
printCompare(N, Index, As, Len) ->
    Former = lists:nth(Index, As),
    Latter = lists:nth(Index + 1, As),
    case Former < Latter of
        true ->
            io:format("Yes~n");
        false ->
            io:format("No~n")
    end,
    printCompare(N, Index + 1, As, Len).
