S = input()
KEYENCE = "keyence"


isKeyence = False
for start in range(99):
    i = start
    stack = 0
    p = 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")

