function solve(S:string):boolean{
    if(S.length<7)return false;
    const key="keyence";
    let pre=0;
    for(let i=0;i<7;i++){
        if(key[i]==S)pre++;
        else break;
    }
    let sur=0;
    for(let i=6;i>=0;i--){
        if(key[i]==S)sur++;
        else break;
    }
    return pre + sur >=7;
}
function Main(raw: string) {
    const lines = raw.split("\n");
    const [firstLine] = lines;
    const S = firstLine;
    console.log(solve(S)?"YES":"NO");
}

//DO NOT EDIT
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
