s=input()
k='keyence'
ans='NO'
for i in range(7):
  lk, rk=k[:i], k[i:]
  if lk in s and rk in s:
    for j in range(len(s)-i):
      if s[j:j+i]==lk:
        if rk in s[j+i:]:
          ans='YES'
print(ans)