#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
const int MOD = 1e9 + 7;
const int dy[] = {1, 0, -1, 0};
const int dx[] = {0, 1, 0, -1};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  string key = "keyence";
  int l = key.size();
  bool ok = false;
  if (s.substr(0, l) == key)
    ok = true;
  else if (s.substr(s.size() - l) == key)
    ok = true;
  else if (s[0] == 'k' && s.back() == 'e') {
    string ans = "";
    int pos = 0;
    bool use = false;
    bool tmp = false;
    bool flag = true;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] == key[pos]) {
        ans += key[pos];
        pos++;
        tmp = true;
      } else if (tmp) {
        if (use) flag = false;
        use = true;
        tmp = false;
      }
    }
    if (flag && ans == key) ok = true;
  }
  cout << (ok ? "YES" : "NO") << endl;
  return 0;
}
