# -*- coding: utf-8 -*-
import sys
from collections import defaultdict, deque
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline()[:-1]


def solve():
    s = input()
    t = 'keyence'
    n = len(s)
    m = len(t)
    i = 0
    j = 0
    cnt = 0
    c = 0
    p = 0
    while i < n and j < m:
        if s[i] == t[j]:
            j += 1
            c = 1
        else:
            c = 0
        
        if c != p and i:
            cnt += 1

        i += 1
        p = c

    if j == m and cnt <= 2:
        print("YES")
    else:
        print("NO")


t = 1
# t = int(input())
for case in range(1,t+1):
    ans = solve()

"""

"""

