s=input()
key="key" in s
ence="ence" in s
if key and ence:
  k=e=-1
  for i in range(len(s)):
    if k!=-1 and e!=-1:
      continue
    if s[i:i+3]=="key":
      k=i
    elif s[i:i+4]=="ence":
      e=i
  if k<e:
    print("YES")
  else:
    print("NO")
else:
  print("NO")