#include <bits/stdc++.h>
using namespace std;
int main(void){
    int n,k;
    cin >> n >> k;
    int a[n];
    for(int i=0;i<n;i++) cin >> a[i];
    for(int i=0;i<n-k;i++){
        if(a[i]<a[k+i]) cout << "Yes" << endl;
        else cout << "No" << endl;
    }
}