s = input()
key = 'keyence'
if 'k' not in s:
    print('NO')
else:
    k = s.index('k')
    count = 0
    st = 1
    if k != 0:
        count += 1
    if k >= len(s)-2:
        print('NO')
    else:
        flag = True
        for i in range(k+1,len(s)):
            if s[i] == key[st]:
                flag = True
                st += 1
                if st == 7:
                    if i != len(s)-1:
                        count += 1
                    break
                continue
            else:
                if flag:
                    count += 1
                    flag = False
        if count <= 1 and st == 7:
            print('YES')
        else:
            print('NO')
            