#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, k = "keyence";
  cin >> s;
  int head_tail = k.size(), tail_head = k.size();
  for (int i = 0; i < k.size(); i++) {
    if (s[i] != k[i]) {
      head_tail = i;
      break;
    }
  }
  reverse(s.begin(), s.end());
  reverse(k.begin(), k.end());
  for (int i = 0; i < k.size(); i++) {
    if (s[i] != k[i]) {
      tail_head = i;
      break;
    }
  }
  string ans = "NO";
  if (head_tail + tail_head == k.size() || s == k) ans = "YES";
  cout << ans << endl;
  cout << head_tail << " " << tail_head << endl;
}
