input = STDIN.read.chomp

S = "keyence".split('')
current = 0
mistake = 0
is_matching = true
is_ok = true

for i in 0..(input.length - 1)
    c = input[i]

    if mistake > 1
        is_ok = false
        break
    end
    if is_matching
        if c == S[current]
            current = current + 1
        else
            is_matching = false
            mistake = mistake + 1
        end
    else
        if c == S[current]
            current = current + 1
            is_matching = true
        end
    end
    if mistake > 1
        is_ok = false
        break
    end
end

if current > 6 && is_ok
    puts "YES"
else
    puts "NO"
end