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 == "" || (done && removing)) break

        if (ch == keyence[0]) {
            if (removing) {
                done = true
                removing = false
            }

            keyence = keyence.drop(1)
        } else if (!removing) {
            removing = true
        }
    }

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