s = input()
target = 'keyence'
s_len = len(s)
flg = 0

for i in range(7):
    target1_ind = -1
    target1 = target[0:i]
    target2 = target[i:7]
    if target1 in s:
        target1_ind = s.index(target1)
        target1_len = len(target1)
        if target2 in s[target1_ind+target1_len:s_len] :
            if target1_ind == 0:
                if s.index(target2)+len(target2)==s_len:
                    flg = 1
                if s.index(target2)+len(target2)==7:
                    flg = 1
            else:
                if target1_ind+len(target) == 7:
                    flg = 1

if flg == 1:
    print('YES')
else:
    print('NO')