using System;

class Program {
    public static void Main() {
#if USE_IDE
        var exStdIn = new System.IO.StreamReader("./../../TestStdin.txt");
        Console.SetIn(exStdIn);
#endif
        const string keyence = "keyence";
        string s = Console.ReadLine();
        var kpos = s.IndexOf("k");
        if (kpos == -1) {
            Console.WriteLine("NO");
            return;
        }

        var epos = s.LastIndexOf("e");
        if (epos == -1) {
            Console.WriteLine("NO");
            return;
        }

        s = s.Substring(kpos, s.Length - kpos - (s.Length - epos - 1));

        bool hit = false;
        int life = 1;
        int i = 0;
        for (int j = 0; j < s.Length; j++) {
            if (keyence[i] == s[j]) {
                i++;
                hit = true;
                if (i == keyence.Length - 1) {
                    Console.WriteLine("YES");
                    return;
                }
            } else if (hit) {
                hit = false;
                life--;
                if (life < 0) {
                    // 最初から見たい
                    life = 0;
                    i = 0;
                }
            }
        }

        Console.WriteLine("NO");
    }
}