import streams, sequtils, strutils, algorithm, math, future, sets, tables, hashes
proc `ceilDiv`*[T](x, y: T): T = x div y + ord(x mod y != 0)
proc `//=`*(x: var SomeInteger; y: SomeInteger) = x = x div y
proc `%=`*(x: var SomeInteger; y: SomeInteger) = x = x mod y
var
    S = stdin.readLine
    idx = 0
    flag = false
    key = "keyence"
    cnt = 0
    allow = 0
for i in 0..S.len-1:
    if idx == 6:
        idx = 0
        break
    if S[i] == key[idx]:
        idx += 1
    else:
        if cnt == 0:
            cnt += 1
            allow += 1
        else:
            if allow != 1:
                idx = 0
                cnt = 0
if idx == 6:
    flag = true
# echo idx
if flag:
    echo "YES"
else:
    echo "NO"
