
'''simple docstring'''


def lowercase_	(   _lowercase				)     ->							Dict:
					'''simple docstring'''

					lowerCamelCase_					:      int     =		len(_lowercase				)
					lowerCamelCase_					:      Dict     =		sum(_lowercase				)

					lowerCamelCase_					:      str     =		[[False for x in range(s + 1				)] for y in range(n + 1				)]

					for i in range(1			,       n + 1				):
										lowerCamelCase_					:      str     =		True

					for i in range(1			,       s + 1				):
										lowerCamelCase_					:      Union[str, Any]     =		False

					for i in range(1			,       n + 1				):
										for j in range(1			,       s + 1				):
															lowerCamelCase_					:      Dict     =		dp[i][j - 1]

															if arr[i - 1] <= j:
																				lowerCamelCase_					:      Optional[int]     =		dp[i][j] or dp[i - 1][j - arr[i - 1]]

					for j in range(int(s / 2				)			,       -1			,       -1				):
										if dp[n][j] is True:
															lowerCamelCase_					:      Dict     =		s - 2 * j
															break

					return diff








'''simple docstring'''


from __future__ import annotations




def lowercase_	(   _lowercase			,       _lowercase			,       _lowercase			,       _lowercase				)     ->							None:
					'''simple docstring'''

					if (direction == 1 and array[indexa] > array[indexa]) or (
					    direction == 0 and array[indexa] < array[indexa]
					):
										lowerCamelCase_,      lowerCamelCase_					:      str     =		array[indexa], array[indexa]




def lowercase_	(   _lowercase			,       _lowercase			,       _lowercase			,       _lowercase				)     ->							None:
					'''simple docstring'''

					if length > 1:
										lowerCamelCase_					:      int     =		int(length / 2				)
										for i in range(_lowercase			,       low + middle				):
															comp_and_swap(_lowercase			,       _lowercase			,       i + middle			,       _lowercase				)
										bitonic_merge(_lowercase			,       _lowercase			,       _lowercase			,       _lowercase				)
										bitonic_merge(_lowercase			,       low + middle			,       _lowercase			,       _lowercase				)




def lowercase_	(   _lowercase			,       _lowercase			,       _lowercase			,       _lowercase				)     ->							None:
					'''simple docstring'''

					if length > 1:
										lowerCamelCase_					:      Dict     =		int(length / 2				)
										bitonic_sort(_lowercase			,       _lowercase			,       _lowercase			,       1				)
										bitonic_sort(_lowercase			,       low + middle			,       _lowercase			,       0				)
										bitonic_merge(_lowercase			,       _lowercase			,       _lowercase			,       _lowercase				)


if __name__ == "__main__":
					__lowercase							:   Any					=     input('''Enter numbers separated by a comma:\n''').strip()
					__lowercase							:   Tuple					=     [int(item.strip()) for item in user_input.split(''',''')]

					bitonic_sort(unsorted, 0, len(unsorted), 1)
					print('''\nSorted array in ascending order is: ''', end='''''')
					print(*unsorted, sep=''', ''')

					bitonic_merge(unsorted, 0, len(unsorted), 0)
					print('''Sorted array in descending order is: ''', end='''''')
					print(*unsorted, sep=''', ''')


