s = 'keyence'
S = input()
ans = 'NO'

for i in range(len(S)):
    if S[i] == 'k':
        for l in range(1, len(s)):
            if S[i+l] != s[l]:
                break
        for n in range(len(S)):
            if S[i:l] + S[l+n:l+n+4] == s and S[l+n+5:] == '':
                if i != 0 and n == 0 or i == 0 and n != 0:
                    print(i)
                    ans = 'YES'
                    break
    if ans == 'YES':
        break
print(ans)