prefix :: String -> String -> String
prefix [] _ = []
prefix _ [] = []
prefix (x:xs) (y:ys)
    | x == y    = x : prefix xs ys
    | otherwise = []

suffix :: String -> String -> String
suffix xs ys = reverse $ prefix (reverse xs) (reverse ys)

solve :: String  -> String
solve s =
    let px = prefix s "keyence"
        sx = suffix s "keyence"
        xs = px ++ sx
    in if "keyence" `elem` [px, sx, xs] then "YES" else "NO"

main = getLine >>= putStrLn . solve