program prob2
    implicit none
    character(len=100)::S
    character(len=7)::a
    integer::i,l
    a = "keyence"

    read(*,*) S
    l = len_trim(S)

    do i = 0, 7
        if(S(1:i) .eq. a(1:i) .and. S(l-6+i:l) .eq. a(i+1:7))then
            write(*,*) "YES"
            stop
        end if
    end do

    write(*,*) "NO"
    stop
end program