import Control.Monad
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 flag = take 7 s == "keyence" || drop (ls-7) s == "keyence"
    --putStrLn $ map chk parts
    let ans = flag || (any (==True) $ map chk parts)
    -- print $ map chk parts
    if ans then putStrLn $ "YES" else putStrLn $ "NO"

--any (==True) $
chk :: (String,String,String) -> Bool
chk (a,b,s)
    | isInfixOf a s || isInfixOf b s == False = False
    | otherwise = if length temp /= 1 then False else (length $ filter (/="") $ map T.unpack $ T.splitOn (T.pack b) (T.pack $ temp !! 0)) == 1
        where 
            temp = filter (/="") $ map T.unpack $ T.splitOn (T.pack a) (T.pack s)

