#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<ll, ll>;
using T = tuple<ll, ll, ll>;
using vll = vector<ll>;
using vP = vector<P>;
using vT = vector<T>;
using vvll = vector<vector<ll>>;
using vvP = vector<vector<P>>;
using dqll = deque<ll>;
ll dx[9] = {-1, 1, 0, 0, -1, -1, 1, 1, 0};
ll dy[9] = {0, 0, -1, 1, -1, 1, -1, 1, 0};
const ll INF = 1LL << 50;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cout << fixed << setprecision(15);
  string s;
  cin >> s;
  ll n = s.size();
  bool ok = false;
  if (s == "keyence") {
    ok = true;
    goto ANS;
  }
  for (ll i = (0); i <= (n - 1); ++i)
    for (ll j = (i); j <= (n - 1); ++j) {
      string test = "";
      if (i > 0) test += s.substr(0, i);
      if (j < n - 1) test += s.substr(j + 1, n - 1 - j);
      if (test == "keyence") {
        cout << i << " " << j << endl;
        ok = true;
        goto ANS;
      }
    }
ANS:
  string ans = ok ? "YES" : "NO";
  cout << ans << endl;
  return 0;
}
