import sys

input = sys.stdin.readline

S = input()
S = S.replace('\n','')
s_list = list(S)

K = "keyence"
k_list = list(K)

count = 0
delete_flag = False
finish_delete_flag = False
for s in s_list:
    if s == k_list[count]:
        if count == len(k_list)-1:
            print("YES") 
            exit(0)

        #delete_flagはもう使えないようにする
        if delete_flag:
            finish_delete_flag = True
        count += 1
    else:
        #もう使ったのにまた異なった
        if finish_delete_flag:
            print("NO")
            exit(0)
        else:
            delete_flag = True

print("NO")
