




"""simple docstring"""




from __future__ import annotations

from bisect import bisect_left
from functools import total_ordering
from heapq import merge





@total_ordering
class  snake_case     (							__snake_case   ):

							def __lt__(self       ,       SCREAMING_SNAKE_CASE_    ):

									"""simple docstring"""







									return self[-1] < other[-1]







							def __eq__(self       ,       SCREAMING_SNAKE_CASE_    ):

									"""simple docstring"""







									return self[-1] == other[-1]







def        _lowerCamelCase ( __a    ):
		SCREAMING_SNAKE_CASE_						 = []
		# sort into stacks
		for element in collection:
				SCREAMING_SNAKE_CASE_						 = Stack([element]    )
				SCREAMING_SNAKE_CASE_						 = bisect_left(_lowerCAmelCase,							_lowerCAmelCase    )
				if i != len(_lowerCAmelCase    ):
						stacks[i].append(_lowerCAmelCase    )
				else:
						stacks.append(_lowerCAmelCase    )

						 # use a heap-based merge to merge stack efficiently
		SCREAMING_SNAKE_CASE_						 = merge(*(reversed(_lowerCAmelCase    ) for stack in stacks)    )
		return collection


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

"""simple docstring"""




from __future__ import annotations

import typing
from collections import Counter



def        _lowerCamelCase ( __a    ):
		SCREAMING_SNAKE_CASE_						 = Counter()
		for base in range(1,							max_perimeter + 1    ):
				for perpendicular in range(__a,							max_perimeter + 1    ):
						SCREAMING_SNAKE_CASE_						 = (base * base + perpendicular * perpendicular) ** 0.5
						if hypotenuse == int(__a    ):
								SCREAMING_SNAKE_CASE_						 = int(base + perpendicular + hypotenuse    )
								if perimeter > max_perimeter:
										continue
								triplets[perimeter] += 1
		return triplets



def        _lowerCamelCase ( __a = 1_000    ):
		SCREAMING_SNAKE_CASE_						 = pythagorean_triple(__a    )
		return triplets.most_common(1    )[0][0]


if __name__ == "__main__":
						print(f'''Perimeter {solution()} has maximum solutions''')