#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  string s;
  cin >> s;
  string k = "keyence";
  int t = 0, cnt = 0;
  string ans = "";
  bool no = false;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == k[t]) {
      if (no) {
        string a = ans;
        a += s.substr(s.length() - (7 - t));
        if (a == k) {
          cout << "YES" << endl;
          return 0;
        }
        ans += s.substr(i);
        break;
      }
      t++;
      ans += s[i];
    } else if (s[i] != k[t])
      no = true;
  }
  cout << ans << endl;
  if (ans == k)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
