



"""simple docstring"""
def      __magic_name__				(							lowercase ):

   if len(lowercase ) < 2:
      return collection

   def circle_sort_util(lowercase							,			lowercase							,			lowercase ) -> bool:
      SCREAMING_SNAKE_CASE_: Optional[int]     			=False

      if low == high:
         return swapped

      SCREAMING_SNAKE_CASE_: Union[str, Any]     			=low
      SCREAMING_SNAKE_CASE_: Optional[int]     			=high

      while left < right:
         if collection[left] > collection[right]:
            SCREAMING_SNAKE_CASE_			,		SCREAMING_SNAKE_CASE_: Optional[Any]     			=(
                collection[right],
                collection[left],
            )
            SCREAMING_SNAKE_CASE_: List[Any]     			=True

         left += 1
         right -= 1

      if left == right and collection[left] > collection[right + 1]:
         SCREAMING_SNAKE_CASE_			,		SCREAMING_SNAKE_CASE_: Union[str, Any]     			=(
             collection[right + 1],
             collection[left],
         )

         SCREAMING_SNAKE_CASE_: Tuple     			=True

      SCREAMING_SNAKE_CASE_: Optional[int]     			=low + int((high - low) / 2 )
      SCREAMING_SNAKE_CASE_: List[str]     			=circle_sort_util(lowercase							,			lowercase							,			lowercase )
      SCREAMING_SNAKE_CASE_: Any     			=circle_sort_util(lowercase							,			mid + 1							,			lowercase )

      return swapped or left_swap or right_swap

   SCREAMING_SNAKE_CASE_: Union[str, Any]     			=True

   while is_not_sorted is True:
      SCREAMING_SNAKE_CASE_: Dict     			=circle_sort_util(lowercase							,			0							,			len(lowercase ) - 1 )

   return collection


if __name__ == "__main__":
   _UpperCAmelCase     =			input("""Enter numbers separated by a comma:\n""").strip()
   _UpperCAmelCase     =			[int(item) for item in user_input.split(""",""")]
   print(circle_sort(unsorted))








"""simple docstring"""
from __future__ import annotations





def      __magic_name__				(							lowercase							,			lowercase ):
   SCREAMING_SNAKE_CASE_: List[Any]     			=sorted(numsa + numsa )
   SCREAMING_SNAKE_CASE_			,		SCREAMING_SNAKE_CASE_: Tuple     			=divmod(len(lowercase )							,			2 )
   if mod == 1:
      return all_numbers[div]
   else:
      return (all_numbers[div] + all_numbers[div - 1]) / 2


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   _UpperCAmelCase     =			[float(x) for x in input("""Enter the elements of first array: """).split()]
   _UpperCAmelCase     =			[float(x) for x in input("""Enter the elements of second array: """).split()]
   print(f"""The median of two arrays is: {median_of_two_arrays(array_a, array_a)}""")



