S = input()

key = "keyence"
ans = True
r = -1

for i in range(len(S)):
    if not key and r != -1:
        ans = False
        break
    if S[i] == key[0]:
        key = key[1:]
    else:
        if r == -1:
            r = i
        elif i - r == 1:
            r = i
        else:
            ans = False
            break
if key:
    ans = False


print("YES" if ans else "NO")