


'''simple docstring'''






import itertools
import math


def    _snake_case  (	A			)		->       bool:

							if 1 < number < 4:
														# 2 and 3 are primes
														return True
							elif number < 2 or number % 2 == 0 or number % 3 == 0:
														# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
														return False

							# All primes number are in format of 6k +/- 1
							for i in range(5					,       int(math.sqrt(A			) + 1			)					,       6			):
														if number % i == 0 or number % (i + 2) == 0:
																					return False
							return True


def    _snake_case  (	)		->       Optional[int]:
							lowerCAmelCase__			  =      2
							while True:
														if is_prime(A			):
																					yield num
														num += 1


def    _snake_case  (	A = 10001			)		->       int:
							return next(itertools.islice(prime_generator()					,       nth - 1					,       A			)			)


if __name__ == "__main__":
		print(f"""{solution() = }""")
"""simple docstring"""


from __future__ import annotations

import typing
from collections import Counter






def      __UpperCAmelCase       (      lowercase		):







  """simple docstring"""
  _UpperCAmelCase    			=   Counter()
  for base in range(1 ,max_perimeter + 1		):
    for perpendicular in range(lowercase ,max_perimeter + 1		):
      _UpperCAmelCase    			=   (base * base + perpendicular * perpendicular) ** 0.5
      if hypotenuse == int(lowercase		):
        _UpperCAmelCase    			=   int(base + perpendicular + hypotenuse		)
        if perimeter > max_perimeter:
          continue
        triplets[perimeter] += 1
  return triplets






def      __UpperCAmelCase       (      lowercase = 10_00		):







  """simple docstring"""
  _UpperCAmelCase    			=   pythagorean_triple(lowercase		)
  return triplets.most_common(1		)[0][0]


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