#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
#define fst first
#define snd second

/* clang-format off */
template <class T, size_t D> struct _vec { using type = vector<typename _vec<T, D - 1>::type>; };
template <class T> struct _vec<T, 0> { using type = T; };
template <class T, size_t D> using vec = typename _vec<T, D>::type;
template <class T> vector<T> make_v(size_t size, const T& init) { return vector<T>(size, init); }
template <class... Ts> auto make_v(size_t size, Ts... rest) { return vector<decltype(make_v(rest...))>(size, make_v(rest...)); }
/* clang-format on */

string lcs(const string& a, const string& b) {
  const int n = a.size(), m = b.size();
  vector<vector<int>> X(n + 1, vector<int>(m + 1));
  vector<vector<int>> Y(n + 1, vector<int>(m + 1));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (a[i] == b[j]) {
        X[i + 1][j + 1] = X[i][j] + 1;
        Y[i + 1][j + 1] = 0;
      } else if (X[i + 1][j] < X[i][j + 1]) {
        X[i + 1][j + 1] = X[i][j + 1];
        Y[i + 1][j + 1] = +1;
      } else {
        X[i + 1][j + 1] = X[i + 1][j];
        Y[i + 1][j + 1] = -1;
      }
    }
  }
  string c;
  for (int i = n, j = m; i > 0 && j > 0;) {
    if (Y[i][j] > 0)
      --i;
    else if (Y[i][j] < 0)
      --j;
    else {
      c.push_back(a[i - 1]);
      --i;
      --j;
    }
  }
  reverse(c.begin(), c.end());
  return c;
}

int main() {
  string s;
  while (cin >> s) {
    string key = "keyence";
    string got = lcs(s, key);
    bool res = key == got;
    cout << (res ? "YES" : "NO") << endl;
  }
  return 0;
}
