import Foundation

func readInt() -> Int {
    return Int(readLine()!)!
}

func readInts(separator: String.Element = " ") -> [Int] {
    return readLine()!.split(separator: separator).map { Int($0)! }
}

func readTwoInts(separator: String.Element = " ") -> (a: Int, b: Int) {
    let ints = readLine()!.split(separator: separator).map { Int($0)! }
    return (a: ints[0], b: ints[1])
}

func mainC() {
    let (N, K) = readTwoInts()
    let terms = readInts()

    var answer: [String] = []

    for i in K...N {

        if i == K {
            // do nothing
        } else if terms[i - 1] > terms[i - 1 - K] {
            answer.append("Yes")
        } else {
            answer.append("No")
        }
    }

    answer.forEach {
        print($0)
    }
}

mainC()