
import Foundation

let input = readLine()!.components(separatedBy: " ").map{ Int($0)! }
let N = input[0]
let K = input[1]
var pointArray = readLine()!.components(separatedBy: " ").map{ Int($0)! }
let evaluationNum = N - K

for j in 0...evaluationNum - 1 {
    if pointArray[j] < pointArray[j + K] {
        print("Yes")
    } else if pointArray[j] >= pointArray[j + K]{
        print("No")
    }
}