import Data.List
import qualified Data.Text as T

main = do
    s <- getLine :: IO String
    let ls = length s
    -- let parts = [("k","eyence",s), ("ke","yence",s), ("key","ence",s), ("keye","nce",s), ("keyen","ce",s), ("keyenc","e",s)]
    -- let pairs = [("k","eyence"), ("ke","yence"), ("key","ence"), ("keye","nce"), ("keyen","ce"), ("keyenc","e")]
    let flag = take 7 s == "keyence" || drop (ls-7) s == "keyence"
    let ans = flag || (solve s [])
    -- print $ map chk parts
    if ans then putStrLn $ "YES" else putStrLn $ "NO"

solve :: String -> String -> Bool
solve rest@(s:ss) path
    | isMF == True = solve ss (s:path)
    | otherwise = if (length $ T.splitOn (T.pack $ getPair path) (T.pack rest)) == 2 then True else False
        where 
            isMF = isMathchFirst $ s:path

getPair :: String -> String
getPair rx = drop (length path) "keyence"
    where 
        path = reverse rx

isMathchFirst :: String -> Bool
isMathchFirst s = case s of
    "k" -> True 
    "ek" -> True 
    "yek" -> True 
    "eyek" -> True 
    "neyek" -> True 
    "cneyek" -> True 
    _ -> False