import std.array;
import std.conv;
import std.string;
import std.algorithm;
import std.stdio;

void main() {
	int n, k;
	readf("%s %s\n", &n, &k);
	auto a = readln.chomp.split(' ').map!(to!int).array;

	foreach (i;0..n - k) {
		if (a[i] < a[k + i]) {
			writeln("Yes");
		} else {
			writeln("No");
		}
	}
}
