#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <typename T>
void chmin(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void chmax(T &a, T b) {
  a = max(a, b);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  int n = s.size();
  string keys = "keyence";
  string l = "", r = "";
  for (int i = 0; i < keys.size(); i++) {
    if (s[i] == keys[i])
      l += s[i];
    else
      break;
  }
  int c = keys.size();
  for (int i = n - 1; i >= n - keys.size(); i--) {
    if (s[i] == keys[--c])
      r += s[i];
    else
      break;
  }
  reverse(r.begin(), r.end());
  vector<bool> true_count(7, false);
  for (int i = 0; i < l.size(); i++) {
    if (keys[i] = l[i]) true_count[i] = true;
  }
  int rs = r.size() - 1;
  for (int i = keys.size() - 1; i >= r.size() - 1; i--) {
    true_count[i] = r[rs];
    rs--;
  }
  for (int i = 0; i < keys.size(); i++) {
    if (!true_count[i]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
}
