'''simple docstring'''




def      UpperCamelCase_							( _UpperCAmelCase  :				list      ,     _UpperCAmelCase  :				list      ,     _UpperCAmelCase  :				list      ,     _UpperCAmelCase  :				int      ,     _UpperCAmelCase  :				int   )   ->   None:


       """simple docstring"""







       if target == 0:
              answer.append(path.copy()   )
       else:
              for index in range(_A      ,     len(_A   )   ):
                     if target >= candidates[index]:
                            path.append(candidates[index]   )
                            backtrack(_A      ,     _A      ,     _A      ,     target - candidates[index]      ,     _A   )
                            path.pop(len(_A   ) - 1   )

def      UpperCamelCase_							( _UpperCAmelCase  :				list      ,     _UpperCAmelCase  :				int   )   ->   list:


       """simple docstring"""







       _UpperCAmelCase					:  Optional[Any]											=   []  # type: list[int]
       _UpperCAmelCase					:  Dict											=   []  # type: list[int]
       backtrack(_A      ,     _A      ,     _A      ,     _A      ,     0   )
       return answer

def      UpperCamelCase_							( )   ->   None:


       """simple docstring"""







       print(combination_sum([-8, 2.3, 0]      ,     1   )   )


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  main()


'''simple docstring'''




from itertools import compress, repeat
from math import ceil, sqrt

def      UpperCamelCase_							( _UpperCAmelCase  :				int   )   ->   list[int]:


       """simple docstring"""







       if num <= 2:
              return []
       if num == 3:
              return [2]

       # Odd sieve for numbers in range [3, num - 1]
       _UpperCAmelCase					:  Optional[int]											=   bytearray(b"\x01"   ) * ((num >> 1) - 1)

       for i in range(3      ,     int(sqrt(_UpperCAmelCase   )   ) + 1      ,     2   ):
              if sieve[(i >> 1) - 1]:
                     _UpperCAmelCase					:  List[Any]											=   i**2
                     _UpperCAmelCase					:  Optional[int]											=   repeat(
                         0      ,     ceil((num - i_squared) / (i << 1)   )   )

       return [2] + list(compress(range(3      ,     _UpperCAmelCase      ,     2   )      ,     _UpperCAmelCase   )   )


if __name__ == "__main__":
  import doctest

  doctest.testmod()

