
input_str = input()

str_list = list(input_str)

keyence = list("keyence")

# 各文字が入ってるインデックスを記録する辞書型
str_index_dict = {}
for char in keyence:
    str_index_dict.setdefault(char, [])

for i, char in enumerate(str_list):
    if char in keyence:
        str_index_dict[char].append(i)

can_skip = True  # 文字を飛ばせるのは一回まで
keyence_iter = iter(keyence)

succes = True

position = 0
for char in keyence:
    if str_index_dict[char] == []:
        succes = False
        break
    if position in str_index_dict[char]:
        str_index_dict[char].remove(position)
        position += 1
    else:
        if can_skip == True:
            tmp_list = str_index_dict[char]
            tmp_list.append(position)
            position = min(str_index_dict[char])
            position = min([i for i in tmp_list if i>position ])
            str_index_dict[char].remove(position)
            position+=1
            can_skip = False
        else:
            succes = False
            break

if succes == True:
    print("YES")
else:
    print("NO")