program main
  implicit none

  character(len=100) :: s
  character(len=7) :: c
  integer :: n, i

  read(*,*) s

  n = len_trim(s)
  c = 'keyence'

  if(index(s,c) /= 0) then
     if (index(s,c) == 1 .or. index(s,c, back=.true.) == n-6) then
        write(*,*) 'YES'
     else
        write(*,*) 'NO'
     end if
     stop
  else
     do i = 1, 7
        if(index(s,c(1:i)) == 1 .and. index(s,c(i+1:7), back=.true.) == n-i) then
           write(*,*) 'YES'
           stop
        end if
     end do
     
     write(*,*) 'NO'
  end if
end program main
