#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const ll MOD = 1e9 + 7;
int N, H, W;
ll A[100010], B[100010];
vector<pair<ll, ll>> v1;
vector<ll> v2;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  string t = "keyence";
  int idx = 0;
  vector<int> v;
  for (int i = 0; i < (int)s.size(); ++i) {
    if (s[i] == t[idx]) {
      v.push_back(i);
      idx++;
    }
  }
  if (idx != t.size()) {
    cout << "NO" << endl;
    return 0;
  }
  int t1 = 0;
  if (v[0] != 0) t1++;
  for (int i = 1; i < v.size(); ++i) {
    if (v[i] != v[i - 1] + 1) t1++;
  }
  if (v[v.size() - 1] != s.size() - 1) t1++;
  if (t1 <= 1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
