#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 2e5 + 5;
const int M = 20;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  string s;
  cin >> s;
  string str = "keyence";
  int i, j, n = s.size(), m = str.size();
  if (n < m) {
    cout << "NO";
    return 0;
  }
  j = 0;
  bool f = 0;
  int idx = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == str[j])
      j++;
    else {
      idx = i;
      break;
    }
    if (j == m) {
      f = 1;
      break;
    }
  }
  j == m - 1;
  for (i = n - 1; i >= 0; i--) {
    if (s[i] == str[j])
      j--;
    else
      break;
    if (j == 0) {
      f = 1;
      break;
    }
  }
  if (f) {
    cout << "YES";
    return 0;
  }
  j = m - 1;
  int id = 0;
  for (i = n - 1; i >= 0; i--) {
    if (s[i] == str[j])
      j--;
    else
      break;
    if (j == idx) {
      id = i;
      f = 1;
      break;
    }
  }
  if (f && id >= idx)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
