S=input()
t='keyence'

for i in range(len(t)-1):
    t1=t[:i+1]
    t2=t[i+1:]
    if S.count(t1)==1 and S[S.index(t1)+len(t1):].count(t2)==1:
        ind1=S.index(t1)
        ind2=S.index(t2)
        if ind1<=ind2:
            if ind1==0:
                if ind2>ind1+len(t1) and ind2+len(t2)<len(S):
                    continue
            if ind1>0:
                if ind2>ind1+len(t1) or ind2+len(t2)<len(S):
                    continue
            print('YES')
            break
else:
    print('NO')