private val scanner = java.util.Scanner(System.`in`)

private fun readInts(n: Int) = Array(n) { scanner.nextInt() }
private fun readLongs(n: Int) = Array(n) { scanner.nextLong() }
private fun readLineInts() = readLine()!!.split(" ").map { it.toInt() }.toTypedArray()
private fun readLineLongs() = readLine()!!.split(" ").map { it.toLong() }.toTypedArray()

fun main(args: Array<String>) {
    val S = readLine()!!

    var keyence = "keyence"

    var removing = false
    var done = false

    for (ch in S) {
        if (keyence == "") {
            if (done) keyence = "X"

            break
        } else {
            if (ch == keyence[0]) {
                keyence = keyence.drop(1)

                if (removing) {
                    removing = false
                    done = true
                }
            } else {
                if (!removing && !done) {
                    removing = true
                } else if (done) {
                    break
                }
            }
        }
    }

    println(if (keyence == "") "YES" else "NO")
}