using System;

namespace KEYPC2019_B
{
    class Program
    {
        static void Main(string[] args)
        {
            var S = Console.ReadLine();
            var keystr = "keyence";

            var iskey = false;
            if (S.Contains(keystr))
            {
                var newS = S.Replace(keystr, "K");
                if (newS.IndexOf('K') == 0 || newS.IndexOf('K') == newS.Length - 1)
                {
                    iskey = true;
                }
            }

            for (int i = 1; i < keystr.Length; i++)
            {
                var targetleft = keystr.Substring(0, i);
                var targetright = keystr.Substring(i, keystr.Length - i);

                if (!(S.Contains(targetleft) && S.Contains(targetright)))
                {
                    continue;
                }

                if (S.IndexOf(targetleft) != 0)
                {
                    continue;
                }

                var newS = S.Replace(targetright, "R");
                if (newS.IndexOf('R') != newS.Length - 1)
                {
                    continue;
                }

                iskey = true;
            }

            Console.WriteLine(iskey ? "YES" : "NO");
        }
    }
}
