


from bisect import bisect
from itertools import accumulate
def 	_UpperCamelCase					(    lowerCAmelCase_	,    lowerCAmelCase_	,    lowerCAmelCase_	,    lowerCAmelCase_ )    ->str:
   UpperCAmelCase      					=  sorted(zip(lowerCAmelCase_	,    lowerCAmelCase_ )	,    key=lambda lowerCAmelCase_ : x[0] / x[1]	,    reverse=lowerCAmelCase_ )
   UpperCAmelCase					,	UpperCAmelCase      					=  [i[0] for i in r], [i[1] for i in r]
   UpperCAmelCase      					=  list(accumulate(lowerCAmelCase_ ) )
   UpperCAmelCase      					=  bisect(lowerCAmelCase_	,    lowerCAmelCase_ )
   return (
       0
       if k == 0
       else sum(vl[:k] ) + (w - acc[k - 1]) * (vl[k]) / (wt[k])
       if k != n
       else sum(vl[:k] )
   )


if __name__ == "__main__":
 import doctest

 doctest.testmod()







from __future__ import annotations
def 	_UpperCamelCase					(    lowerCAmelCase_	,    lowerCAmelCase_ )    ->Optional[int]:
   # Checks if the entire collection has been sorted
   if len(lowerCAmelCase_ ) <= 1 or n <= 1:
      return

   insert_next(lowerCAmelCase_	,    n - 1 )
   rec_insertion_sort(lowerCAmelCase_	,    n - 1 )
def 	_UpperCamelCase					(    lowerCAmelCase_	,    lowerCAmelCase_ )    ->Dict:
   # Checks order between adjacent elements
   if index >= len(lowerCAmelCase_ ) or collection[index - 1] <= collection[index]:
      return

   # Swaps adjacent elements since they are not in ascending order
   UpperCAmelCase					,	UpperCAmelCase      					=  (
       collection[index],
       collection[index - 1],
   )

   insert_next(lowerCAmelCase_	,    index + 1 )


if __name__ == "__main__":
 __a	 =      input("""Enter integers separated by spaces: """)
 __a	 =      [int(num) for num in numbers.split()]
 rec_insertion_sort(number_list, len(number_list))
 print(number_list)



