lcp [] _ = []
lcp _ [] = []
lcp (x:xs) (y:ys) = if x == y then x : lcp xs ys else []

lcs x y = reverse $ lcp (reverse x) (reverse y)

solve s
    | s == "keyence" = "YES"
    | otherwise      =
        let u = lcp s "keyence"
            v = lcs s "keyence"
        in if u ++ v == "keyence" then "YES" else "NO"

main = getLine >>= putStrLn . solve
