#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,K,i;scanf("%d%d",&N,&K);
  int a[N];
  for(i=0;i<N;i++) scanf("%d",&a[i]);
  for(i=0;i<N-K;i++) cout << ((a[i] < a[i+K]) ? "Yes\n":"No\n");
}