program keyence2019B
    implicit none
    integer(8)::i,flg,S_len,cur,diff_count,diff_flg
    character(100)::S
    character(7)::mask="keyence"
    read(5,*)S
    S_len=len_trim(S)
    flg=0
    diff_count=0
    diff_flg=0
    cur=1

    do i=1,S_len
        if(S(i:i)==mask(cur:cur))then
            diff_flg=0
            cur=cur+1
        else if(diff_flg==0)then
            diff_count=diff_count+1
            diff_flg=1
        end if

        if(diff_count>1)then
            flg=1
            exit
        end if
    end do

    if(cur<=7)flg=1

    if(flg==0)print'(A)',"YES"
    if(flg==1)print'(A)',"NO"
end program keyence2019B