head0 :: String -> String -> (String,String)
head0 [] _ = ([],[])
head0 _ [] = (['a'],[])
head0 (k:ey) (l:ls) = if k == l then head0 ey ls else (k:ey,l:ls)

main :: IO ()
main = do
  l <-  getLine 
  if (fst $ head0 (reverse $ fst $ head0 "keyence" l) (reverse $ snd $ head0 "keyence" l)) == [] 
    then print "YES" else print "NO"