#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 left = "";
    int pos = 0;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] != key[pos]) break;
      left += s[i];
      pos++;
    }
    string right = "";
    int pos1 = key.size() - 1;
    for (int i = s.size() - 1; i >= 0; i--) {
      if (s[i] != key[pos1]) break;
      right += s[i];
      pos1--;
    }
    reverse(right.begin(), right.end());
    string ans = left;
    for (int i = 0; i < right.size(); i++) {
      ans += right.substr(i);
      if (ans == key) ok = true;
    }
    for (int i = 0; i < left.size(); i++) {
      string tmp = left.substr(i);
      ans = tmp + right;
      if (ans == key) ok = true;
    }
  }
  cout << (ok ? "YES" : "NO") << endl;
  return 0;
}
