import sys
s = list(input())
sr = list(reversed(s))
k = list("keyence")
kr = list(reversed(k))
cur = 0
curr = 0
mlen = 0
mlenr = 0
i = 0
ir = 0
while cur <= len(s)-1:
  if s[cur] == k[i]:
    i += 1
    mlen = max(mlen,i)
    if mlen == 7:
      print("YES")
      sys.exit()
  else:
    i = 0
  cur += 1
while curr <= len(sr)-1:
  if sr[curr] == kr[ir]:
    ir += 1
    mlenr = max(mlenr,ir)
  else:
    ir = 0
  curr += 1
if mlen+mlenr >= 7:
  print("YES")
else:
  print("NO")