program KEYENCE_String
  implicit none
  character(100) :: s
  integer :: n, i
  read(*,*) s
  n = len_trim(s)
  do i = 1, 6
    if (s(1:i)//s(n-6+i:n) == "keyence") then
      write(*,'(a)') "YES"
      stop
    end if
  end do
  if (s(1:7) == "keyence" .or. s(n-6:n) == "keyence") then
    write(*,'(a)') "YES"
  else
    write(*,'(a)') "NO"
  end if
end program KEYENCE_String