s = input()
finalcheck = 0
moji = 'keyence'
for i in range(1,8):
    check = 0;front = False
    for j in range(len(s)-i+1):
        if moji[:i] == s[j:j+i]:
            check = j+i
            if j == 0:front = True
            if i == 7:
                if len(s[:j]) == 0 or len(s[j+i:]) == 0: finalcheck = 1
            break
    if check != 0:
        if front:
            if moji[i:] == s[check:check+len(s)-i]:
                finalcheck = 1
            break
        for j in range(check,len(s)-i+1):
            if moji[i:] == s[j:j+len(s)-i]:
                if check != j:
                    if len(s[j+len(s)-i:]) != 0:
                        continue
                finalcheck = 1
                break
    if finalcheck == 1:break
if finalcheck:print('YES')
else:print('NO')