S = input()

keyence = list("keyence")
str_len = len(keyence)

pos_list = []

for i, char in enumerate(S):
    if len(keyence) == 0:
        break
    if char == keyence[0]:
        pos_list.append(i)
        del keyence[0]

diff = map(lambda x, y: x - y, pos_list[1:], pos_list[:-1])
over_one_num = len(list(filter(lambda x: x > 1, diff)))

if over_one_num <= 1 and len(pos_list) == str_len:
    print("YES")
else:
    print("NO")