#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T &x, U y) {
  if (x < y) x = y;
}
long long MOD = 998244353;
struct Edge {
  int src, dst;
  long long weight;
};
bool operator<(const Edge &e, const Edge &f) {
  return e.weight != f.weight ? e.weight > f.weight
         : e.src != f.src     ? e.src < f.src
                              : e.dst < f.dst;
}
int main() {
  string str;
  cin >> str;
  string temp = "keyence";
  int st = 0, ed = 0;
  int n = str.size(), m = temp.size();
  while (str[st] == temp[st] && st < min(n, m)) {
    st++;
  }
  while (str[n - 1 - ed] == temp[m - 1 - ed] && ed < min(n, m)) {
    ed++;
  }
  cout << st << " " << ed << endl;
  if (st + ed >= 7)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
