S = input().strip("\n")
N = len(S)
w = "keyence"
for i in range(7):
  print(i)
  if S[:i] == w[:i] and S[N-7+i:] == w[i:]:
    print(S[:i])
    print(S[N - 7 + i:])
    print(w[:i])
    print(w[i:])
    print("YES")
    break
  else: print("NO")