s=input();
a='keyence'
flag=False
for i in range(len(a)):
  if (a[:i] in s) and (a[i:] in s) and s.count('e')>2:
    print("YES")
    flag=True
    break
if not flag:
  for i in range(1,len(a)-1):
    for j in range(i+1,len(a)):
      s1,s2,s3=a[:i],a[i:j],a[j:]
      if (s1+s3+s2 in s) or (s2+s1+s3 in s) or (s2+s3+s1 in s) or (s3+s1+s2 in s) or (s3+s2+s1 in s):
        print("YES")
        flag=True
        break
    if flag:
      break
  if not flag:
    print("NO")