# -*- coding: utf-8 -*-

## Library

import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
import copy

## input

# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
#    S = []
#    for _ in range(N):
#        S.append(list(input()))

S = input()

tmp = 0
first = 0
second = 0

for i in range(len(S)):
    if tmp == 0 and S[i:i+3] == "key":
        tmp = 1
        first = i
    if tmp == 1 and S[i:i+4] == "ence":
        tmp = 2
        second = i

if tmp < 2:
    print("NO")
    sys.exit()

if second - first == 3:
    if first == 0 or second == len(S)-4:
        print("YES")
    else:
        print("NO")
else:
    if first == 0 and second == len(S)-4:
        print("YES")
    else:
        print("NO")
