func solve(_ arr: [Int], _ n: Int, _ k: Int) -> [String] {
    var left = 0, right = k
    var res = [String]()
    while right < n {
        if arr[left] >= arr[right] {
            res.append("No")
        } else {
            res.append("Yes")
        }
        left += 1
        right += 1
    }
    return res
}



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

print(solve(arr, n, k).joined(separator: "\n"))
