s = 'aaaaaa' + input() + 'aaaaaa'
front_length = [0]*(len(s)-12)
front_max = 0
back_length = [0]*(len(s)-12)
back_max = 0
key = 'keyence'
for i in range(len(s)-12):
  for j in range(7,-1,-1):
    if s[6+i-j:6+i] == key[:j]:
      front_length[i] = max([front_max, j])
      front_max = max([front_max, j])
      break
for i in range(len(s)-12-1,-1,-1):
  for j in range(7,-1,-1):
    if s[6+i:6+i+j] == key[7-j:]:
      back_length[i] = max([back_max, j])
      back_max = max([back_max, j])
      break
for i, j in zip(back_length, front_length):
  if i+j>=7:
    print('YES')
    break
else:
  print('NO')