import re

s = input()
key = 'keyence'
x = 0

str0 = re.compile(r'^' + key)
str1 = re.compile(r'' + key + '$')
if str0.search(s) != None or str1.search(s) != None:
  x = 1
  print(str0.search(s))
  print(str1.search(s))
else:
  for i in range(7):
    str0 = re.compile(r'^' + key[i:])
    str1 = re.compile(r'' + key[:-(6-i)] + '$')
    if str0.search(s) != None and str1.search(s) != None:
      x = 1
      print(str0.search(s))
      print(str1.search(s))

if x == 1:
  print('YES')
else:
  print('NO')