use std::*;
use proconio::{input, fastout, marker::*};

#[fastout]
fn main() {
  input!{
    s:String
  }
  let key = String::from("keyence");
  let mut ans :i32 = 0; let mut c :usize = 0;
  let mut flag :bool = true; let mut can :bool = false;
  for i in 0..s.len() {
    let x = key.chars().nth(c).unwrap();
    if s.chars().nth(i).unwrap() == x {
        flag = true;
        if c < 6 {c += 1;} else {can = true;}
    } else {
        if flag {ans += 1;}
        flag = false;
    }
  }
  println!("{}", if ans <= 1 && can {"YES"} else {"NO"});
}
