function Main(input) {
	input = input.trim().split("\n").map(function(x) { return x.split(" ")});
	let N = parseInt(input[0][0], 10);
	let K = parseInt(input[0][1], 10);
	let v_A = input[1].map(e => parseInt(e, 10));
	let v_ans = [];
	for (let i = 0; i < N - K; i++){
		if (v_A[i] < v_A[i + K]) v_ans.push('Yes');
		else v_ans.push('No');
	}

	console.log(v_ans.join("\n"));

}


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