s=input()
string="keyence"
flag1=0
flag2=0
v=0

for i in range(len(s)):
  try:
    if s[i]==string[v]:
      v+=1
      if flag1==1:
        flag2=1
    else:
      flag1=1
      mojiretsu=string[v:]
      if len(mojiretsu)==1:
        if s[-1]==mojiretsu and flag2 == 0:
          print('YES')
          exit()
      if s[-1:-len(mojiretsu)-1:-1][::-1]==mojiretsu:
        print('YES')
        exit()
      if flag1==1 and flag2==1:
        print("NO")
        exit()
      if v==len(string)+1:
        print('NO')
        exit()
  except IndexError:
    if flag1==0 and flag2==0:
      print('YES')
      exit()
    else:
      print('NO')
      exit()

if flag1==0 and flag2==0:
  print('YES')
elif flag1==1 and flag2==0:
  print('NO')
else:
  print('YES')
