using System;
using System.Collections.Generic;
using System.Linq;

namespace test
{
    class Program
    {
        static void Main(string[] args)
        {
            var S = Read();
            var ans = false;
            if (S.Substring(0, 3) == "key")
            {
                if (S.Substring(S.Length - 4, 4) == "ence") ans = true;
                else if (S.Substring(3, 4) == "ence") ans = true;
            }
            else if(S.Substring(S.Length - 4, 4) == "ence")
            {
                if (S.Substring(0, 3) == "key") ans = true;
                else if (S.Substring(S.Length - 7, 3) == "key") ans = true;
            }

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

        static string Read() { return Console.ReadLine(); }
        static int ReadInt() { return int.Parse(Read()); }
        static long ReadLong() { return long.Parse(Read()); }
        static int[] ReadArrayInt() { return Read().Split(' ').Select(s => int.Parse(s)).ToArray(); }
        static long[] ReadArrayLong() { return Read().Split(' ').Select(s => long.Parse(s)).ToArray(); }
    }
}