// inputに入力データ全体が入る
function Main(input) {

    input = input.split("\n");
  
    line1 = input[0].split(" ");
    let N = parseInt(line1[0], 10);
    let K = parseInt(line1[1], 10);

    line2 = input[1].split(" ");



    let ans = '';

    for (let i = K; i < N; i++) {
        if (line2[i - K] < line2[i]) {
            ans += "Yes\n";
        } else {
            ans += "No\n";
        }
    }

    console.log(ans);}


Main(require("fs").readFileSync("/dev/stdin", "utf8"));