using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;

namespace AtCorder
{
	public class Program
	{
		static void Main(string[] args)
		{
			string s = Console.ReadLine();
			string key = "keyence";
			bool removed = false;
			bool removing = false;
			int index = 0;
			int n = s.Length;
			for (int i = 0; i < n; i++) {
				if (s[i] == key[index]) {
					removing = false;
					if (index == 6) {
						if (removed == false || i == n - 1) {
							Console.WriteLine("YES");
							return;
						} else {
							removing = true;
							index = 0;
							i -= 1;
						}
					} else {
						++index;
					}
				} else {
					if (removing == false && removed) {
						removing = true;
						index = 0;
						i -= 1;
						continue;
					}

					removed = true;
					removing = true;
				}
			}

			Console.WriteLine("NO");
		}
	}
}