import Foundation

let nk = readLine()!
    .split(separator: " ")
    .map { Int($0)! }
let n = nk[0]
let k = nk[1]
let ax = readLine()!
    .split(separator: " ")
    .map { Int($0)! }

for i in 0..<n-k {
    print(ax[i] < ax[i + k] ? "Yes" : "No")
}
