




'''simple docstring'''



from __future__ import annotations







def       _UpperCamelCase			(_lowerCamelCase				:  list ,						_lowerCamelCase				:  int ,						_lowerCamelCase				:  int ,						_lowerCamelCase				:  int						)-> Tuple:




     '''simple docstring'''





     __snake_case            =	[]
     __snake_case            =	input_list[low:mid], input_list[mid : high + 1]
     while left and right:
          result.append((left if left[0] <= right[0] else right).pop(0						)						)
     __snake_case            =	result + left + right
     return input_list







def       _UpperCamelCase			(_lowerCamelCase				:  list						)-> Optional[Any]:




     '''simple docstring'''





     if len(UpperCamelCase_						) <= 1:
          return input_list
     __snake_case            =	list(UpperCamelCase_						)

     # iteration for two-way merging
     __snake_case            =	2
     while p <= len(UpperCamelCase_						):
          # getting low, high and middle value for merge-sort of single list
          for i in range(0 ,						len(UpperCamelCase_						) ,						UpperCamelCase_						):
               __snake_case            =	i
               __snake_case            =	i + p - 1
               __snake_case            =	(low + high + 1) // 2
               __snake_case            =	merge(UpperCamelCase_ ,						UpperCamelCase_ ,						UpperCamelCase_ ,						UpperCamelCase_						)
          # final merge of last two parts
          if p * 2 >= len(UpperCamelCase_						):
               __snake_case            =	i
               __snake_case            =	merge(UpperCamelCase_ ,						0 ,						UpperCamelCase_ ,						len(UpperCamelCase_						) - 1						)
               break
          p *= 2

     return input_list


if __name__ == "__main__":
     UpperCAmelCase_							:	Optional[Any]	     =		input('''Enter numbers separated by a comma:\n''').strip()
     if user_input == "":
          UpperCAmelCase_							:	List[str]	     =		[]
     else:
          UpperCAmelCase_							:	str	     =		[int(item.strip()) for item in user_input.split(''',''')]
     print(iter_merge_sort(unsorted))










'''simple docstring'''





def        a__     (					UpperCamelCase_						:      int | float | str						):
   try:
      UpperCAmelCase__	:Union[str, Any]      =      float(UpperCamelCase_						)
   except ValueError:
      raise ValueError('''Please enter a valid number'''						)
   UpperCAmelCase__	:List[str]      =      decimal - int(UpperCamelCase_						)
   if fractional_part == 0:
      return int(UpperCamelCase_						), 1
   else:
      UpperCAmelCase__	:List[Any]      =      len(str(UpperCamelCase_						).split('''.'''						)[1]						)
      UpperCAmelCase__	:Tuple      =      int(decimal * (10**number_of_frac_digits)						)
      UpperCAmelCase__	:int      =      10**number_of_frac_digits
      UpperCAmelCase__   ,						UpperCAmelCase__	:List[str]      =      denominator, numerator
      while True:
         UpperCAmelCase__	:Optional[Any]      =      dividend % divisor
         if remainder == 0:
            break
         UpperCAmelCase__   ,						UpperCAmelCase__	:List[str]      =      divisor, remainder
      UpperCAmelCase__   ,						UpperCAmelCase__	:Tuple      =      numerator / divisor, denominator / divisor
      return int(UpperCamelCase_						), int(UpperCamelCase_						)


if __name__ == "__main__":
    print(F'''{decimal_to_fraction(2) = }''')
    print(F'''{decimal_to_fraction(89.0) = }''')
    print(F'''{decimal_to_fraction("67") = }''')
    print(F'''{decimal_to_fraction("45.0") = }''')
    print(F'''{decimal_to_fraction(1.5) = }''')
    print(F'''{decimal_to_fraction("6.25") = }''')
    print(F'''{decimal_to_fraction("78td") = }''')



