<?php
fscanf(STDIN, '%s', $str);
$chars = str_split($str);
$start = array_slice($chars, 0, 3);
$end = array_slice($chars, -4, 4);
if (implode($start) === 'key' && implode($end) === 'ence') {
    echo 'YES';
} elseif (strpos($str, 'keyence') !== false && (substr($str, 0, 7) === 'keyence' || substr($str, -7, 7) === 'keyence')) {
    echo 'YES';
} else {
    echo 'NO';
}
echo "\n";