#[allow(dead_code)]
fn main() {
    let mut bb = i::str();
    let vecs1:Vec<char> =bb.as_str().chars().collect();
    let mut len1 = bb.len();
    let mut str=String::from("keyence");
    let vecs2:Vec<char> =str.as_str().chars().collect();

    let mut henkai=0;
    let mut henkaichuu=false;
    let mut pnum=0;
    let mut num1=0;

    for xx1 in vecs1 {
        let mut moji=vecs2[pnum];
        if (xx1==moji){
            henkaichuu=false;
            pnum+=1;
        }else{
            if (henkaichuu){
            }else{
                henkai+=1;
                if (henkai>1){
                    println!("NO");
                    return;
                }
                henkaichuu=true;
            }
        }
        if (pnum==7){
            //
            if ((len1-1)==(num1)){
                break;
            }else{
                if (henkai==0){
                    break;
                }else{
                    println!("NO");
                    return;
                }
            }
        }
        num1+=1;
    }
    println!("YES");
}


#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::{HashMap, HashSet, VecDeque};
#[allow(unused_imports)]
use std::io::*;
#[allow(unused_imports)]
use std::num::*;
#[allow(unused_imports)]
use std::str::*;
use crate::i::str;

#[allow(dead_code)]
mod i {
    use super::*;

    pub fn read<T: FromStr>() -> T {
        stdin()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>()
            .parse::<T>()
            .ok()
            .unwrap()
    }

    pub fn str() -> String {
        read()
    }

    pub fn s() -> Vec<char> {
        str().chars().collect()
    }

    pub fn i() -> i64 {
        read()
    }

    pub fn u() -> usize {
        read()
    }

    pub fn u2() -> (usize, usize) {
        (read(), read())
    }

    pub fn u3() -> (usize, usize, usize) {
        (read(), read(), read())
    }

    pub fn f() -> f64 {
        read()
    }

    pub fn c() -> char {
        read::<String>().pop().unwrap()
    }

    pub fn iv(n: usize) -> Vec<i64> {
        (0..n).map(|_| i()).collect()
    }
    pub fn strv(n: usize) -> Vec<String> {
        (0..n).map(|_| str()).collect()
    }

    pub fn iv2(n: usize) -> Vec<(i64, i64)> {
        (0..n).map(|_| iv(2)).map(|a| (a[0], a[1])).collect()
    }

    pub fn uv(n: usize) -> Vec<usize> {
        (0..n).map(|_| u()).collect()
    }

    pub fn uv2(n: usize) -> Vec<(usize, usize)> {
        (0..n).map(|_| uv(2)).map(|a| (a[0], a[1])).collect()
    }

    pub fn uv3(n: usize) -> Vec<(usize, usize, usize)> {
        (0..n).map(|_| uv(3)).map(|a| (a[0], a[1], a[2])).collect()
    }

    pub fn fv(n: usize) -> Vec<f64> {
        (0..n).map(|_| f()).collect()
    }

    pub fn cmap(h: usize) -> Vec<Vec<char>> {
        (0..h).map(|_| s()).collect()
    }
}
