import copy
s=input()
check="keyence"
tmp=6
for i in reversed(s):
  if i == check[tmp]:
    tmp-=1
  else:
    break
  if tmp == -1:
    print("YES")
    exit()
    
tmp2=len(s)-(6-tmp)-1
for i in reversed(s[:tmp2+1]):
  if i != check[tmp]:
    tmp2-=1
  else:
    break
if tmp2 == 0:
  print("YES")
  exit()

tmp3=0
for i in range(tmp2,-1,-1):
  if s[i] == check[tmp]:
    tmp-=1
  else:
    print("NO")
    exit()
  if tmp == -1:
    tmp3=i
    break
if tmp3 == 0:
  print("YES")
else:
  print("NO")