s = input()
l = list(s)
b = 0
x='keyence'
for i in x:
    if i in l:
        d = l.index(i)
        if (d>=b):
            b=d
            l.remove(l[d])
        elif l[d+1:].index(i):
            d1=l[d+1:].index(i)
            if (d1>=b):
                b=d1
                l.remove(l[d1])
        else:
            print('NO')
            break
    else:
        print('NO')
        break
else:
    print('YES')