import sys
s = list(input())
time = 0
i = 0
n = 0
start = -1
end = -1
for i in range(7):
    if s[i+n] != "keyence"[i]:
        start = i
        while i+n < len(s) and "keyence"[i] != s[i+n]:
            n += 1
        else:
            end = i+n
            break
if start != -1 and end != -1:
    del s[start:end]
    if s == list("keyence"):
        print("YES")
    else:
        print("NO")
else:
    print("YES")
