#!/mnt/c/Users/moiki/bash/env/bin/python
s = input()

i_t = 0
text="keyence"
continue_ = False

l_i_occurance = []

for i_s,c in enumerate(s):
    if i_t == 7:
        continue_ = True
        break

    if c == text[i_t]:
        i_t += 1
        l_i_occurance.append(i_s)

# print("l_i_occurance: ", l_i_occurance)

if len(l_i_occurance) == len(text):
    diff = []
    for i_l in range(len(l_i_occurance)-1):
        diff.append(  l_i_occurance[i_l+1] - l_i_occurance[i_l] ) 
    # print("diff: ", diff)
    al_penalty = l_i_occurance[0] != 0

    if   len(set(diff)) == 1:
        if al_penalty and continue_:
            print("NO")
        else:
            print("YES")
    elif len(set(diff)) == 2:
        if continue_:
            print("NO")
        elif al_penalty:
            print("NO")
        else:
            print("YES")
    elif len(set(diff)) >= 3:
        print("NO")
    # if len(set(diff)) >= 3:
    #     print("NO")
    # else:
    #     print("YES")
    
else:
    print("NO")


