S = input()
p = 0
KEYENCE = "keyence"
stack = 0

isKeyence = False
i = 0
while i < len(S):
    s = S[i]
    if s == KEYENCE[p]:
        p += 1
        if p == len(KEYENCE):
            isKeyence = True
            break
    else:
        if i > 0 and S[i-1] == KEYENCE[p-1]:
            stack += 1
            if stack > 1:
                stack = 0
                p = 0
                i -= 1
    i += 1
if isKeyence:
    print("YES")
else:
    print("NO")

