# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

s = input()
l = deque("keyence")
if (s[0:7] == "keyence"):
    print("YES")
elif (s[-7:-1] + s[-1] == "keyence"):
    print("YES")
else:
    if s[0] == 'k' and s[-1] == "e":
        count = 0
        c = 0
        mode = 0
        for ss in list(s):
            if count == 7:
                print("NO")
                sys.exit()
            if l[c] == ss:
                count += 1
                c += 1
                if mode == 1:
                    mode = 2
            else:
                if mode == 0:
                    mode = 1
                elif mode == 2:
                    print("NO")
                    sys.exit()
        if count == 7:
            print("YES")
            sys.exit()
        else:
            print("NO")
            sys.exit()
    else:
        print("NO")
        