A string is called a KEYENCE string when it can be changed to `keyence` by removing its contiguous substring (possibly empty) only once.  Given a string S consisting of lowercase English letters, determine if S is a KEYENCE string.
S = input()
for i in range(len(S)-7):
  if S[:i]+S[7-i:]=="keyence":
    print("YES")
    break
else:
  print("NO")
S = input()

for i in range(8):
    if S[:i]+S[-(7-i):]=="keyence":
        print("YES")
        break
else:
    print("NO")
