#include<bits/stdc++.h>
#include<stdio.h>
#include<vector>
#include<deque>
#include<string>
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#include<set>
#define ws " "
#define nl "\n"
#define tc ll test; cin>>test; while(test--)
#define f(i, a, b) for(ll i = a; i<b; i++)
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL)
#define mod 1000000007

#define MAXN 1000001

// stores smallest prime factor for every number
int spf[MAXN];

using namespace std;

#define pll pair<ll, ll>
bool compare(pll a, pll b)
{
	//for descending order replace with a.roll >b.roll
   if((a.ff < b.ff)||((a.ff==b.ff)&&a.ss<b.ss))
        return 1;
	else
		return 0;
}



/*bool compare(pll i, pll j)
{
	return (i.first<j.first)||((i.first==j.first)&&(i.second<j.second));
}*/
ll getSum(ll n)
{
   ll sum = 0;
   while (n != 0)
   {
       sum = sum + n % 10;
       n = n/10;
   }
   return sum;
}

void sieve()
{
	spf[1] = 1;
	for (ll i=2; i<MAXN; i++)

		// marking smallest prime factor for every
		// number to be itself.
		spf[i] = i;

	// separately marking spf for every even
	// number as 2
	for (ll i=4; i<MAXN; i+=2)
		spf[i] = 2;

	for (ll i=3; i*i<MAXN; i++)
	{
		// checking if i is prime
		if (spf[i] == i)
		{
			// marking SPF for all numbers divisible by i
			for (ll j=i*i; j<MAXN; j+=i)

				// marking spf[j] if it is not
				// previously marked
				if (spf[j]==j)
					spf[j] = i;
		}
	}
}

// A O(log n) function returning primefactorization
// by dividing by smallest prime factor at every step
vector<ll> getFactorization(ll x)
{
	vector<ll> ret;
	while (x != 1)
	{
		ret.push_back(spf[x]);
		x = x / spf[x];
	}
	return ret;
}ll countDivisors(ll n);
bool checkPrime(ll n);
int countFreq(string &pat, string &txt)
{
    int M = pat.length();
    int N = txt.length();
    int res = 0;

    /* A loop to slide pat[] one by one */
    for (int i = 0; i <= N - M; i++)
    {
        /* For current index i, check for
           pattern match */
        int j;
        for (j = 0; j < M; j++)
            if (txt[i+j] != pat[j])
                break;

        // if pat[0...M-1] = txt[i, i+1, ...i+M-1]
        if (j == M)
        {
           res++;
           j = 0;
        }
    }
    return res;
}
ll binaryToDecimal(ll n)
{
    ll num = n;
    ll dec_value = 0;

    // Initializing base value to 1, i.e 2^0
    ll base = 1;

    ll temp = num;
    while (temp) {
        ll last_digit = temp % 10;
        temp = temp / 10;

        dec_value += last_digit * base;

        base = (base * 2)%1000003;
    }

    return dec_value;
}

ll power(ll x, ll y, ll p)
{
    ll res = 1;     // Initialize result

    x = x % p; // Update x if it is more than or
                // equal to p

    if (x == 0) return 0; // In case x is divisible by p;

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            res = (res*x) % p;

        // y must be even now
        y = y>>1; // y = y/2
        x = (x*x) % p;
    }
    return res;
}

string s[51], sb[51];

void stringGenA()
{
    f(i, 1, 51)
    {
        f(j, 0, i)
        {
            s[i]+='a';
        }
    }
}



void stringGenB()
{
    f(i, 1, 51)
    {
        f(j, 0, i)
        {
            sb[i]+='b';
        }
    }
}

void solve()
{
    int n, k;
    cin>>n>> k;

    int arr[n];
    f(i, 0, n)
    cin>>arr[i];

    f(i, 0, n-k)
    {
        if(arr[k + i]>arr[i])
        cout<<"Yes"<<nl;
        else cout<<"No"<<nl;
    }
}

int main()
{
    fastIO;


    //cout<<3<<nl;
   // tc
    solve();
}

/*


    int n;
    cin>>n;
    int arr[n];
    int mx = INT_MIN;


    f(i, 0, n)
    {
        cin>>arr[i];
        if(arr[i]>mx)
            mx = arr[i];
    }

    string sa = "", sb = "", sc = "";

    f(i, 0, mx+1){
    sa+='a';
    sb+='b';
    sc+='c';}

    bool b;
    if(arr[0] == 0)
        b = false;
    else b = true;
    string prev, alloted;
    cout<<sa<<nl;
    prev = sa;
    f(i, 1, n)
    {
        if(arr[i]==0&&arr[i-1]==0&&arr[i-2]==0)
        {
            if(b)
                b = false;
            else b = true;
        }
        if(i%2){
            if(b)
        alloted = sb;
        else alloted = sa;
        }
        else {
            if(b)
                alloted = sa;
            else alloted = sb;
        }

        f(j, 0, arr[i-1])
        {
            alloted[j] = prev[j];
        }
        cout<<alloted<<nl;
        prev = alloted;
    }

    alloted = sc;
    f(i, 0, arr[n-1])
    alloted[i] = prev[i];
    cout<<alloted<<nl;

    //if(arr[n-1]==0)
      //  cout<<'x'<<nl;
    //else
   // cout<<prev<<nl;
   */

void fillPrefixSum(ll arr[], int n, ll prefixSum[])
{
    prefixSum[0] = arr[0];
    for (int i = 1; i <n; i++)
        prefixSum[i] = prefixSum[i-1] + arr[i];

}

bool checkPrime(ll n)
{
    // Corner cases
    if (n <= 1)  return false;
    if (n <= 3)  return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n%2 == 0 || n%3 == 0) return false;

    for (ll i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return false;

    return true;
}


Measured memory_bytes: 4400