






from __future__ import annotations

import math
import random






def     lowerCamelCase__				(   __lowerCamelCase      :					int  ,		__lowerCamelCase      :					int  ,		__lowerCamelCase      :					int		):
  __UpperCAmelCase							:     str									=  d * e - 1
  __UpperCAmelCase							:     Any									=  0
  __UpperCAmelCase							:     str									=  0
  while p == 0:
    __UpperCAmelCase							:     Optional[int]									=  random.randint(2  ,		n - 1		)
    __UpperCAmelCase							:     Dict									=  k
    while True:
      if t % 2 == 0:
        __UpperCAmelCase							:     List[str]									=  t // 2
        __UpperCAmelCase							:     Optional[int]									=  (g**t) % n
        __UpperCAmelCase							:     Any									=  math.gcd(x - 1  ,		__lowerCamelCase		)
        if x > 1 and y > 1:
          __UpperCAmelCase							:     Optional[Any]									=  y
          __UpperCAmelCase							:     Optional[int]									=  n // y
          break  # find the correct factors
      else:
        break  # t is not divisible by 2, break and choose another g
  return sorted([p, q]		)


if __name__ == "__main__":
       import doctest

       doctest.testmod()










def     lowerCamelCase__				(   ):

  for a in range(300		):
    for b in range(a + 1  ,		400		):
      for c in range(b + 1  ,		500		):
        if (a + b + c) == 1000 and (a**2) + (b**2) == (c**2):
          return a * b * c

  return -1






def     lowerCamelCase__				(   ):

  for a in range(300		):
    for b in range(400		):
      __UpperCAmelCase							:     Optional[Any]									=  1000 - a - b
      if a < b < c and (a**2) + (b**2) == (c**2):
        return a * b * c

  return -1






def     lowerCamelCase__				(   ):
  import timeit

  print(
      timeit.timeit("""solution()"""  ,		setup="""from __main__ import solution"""  ,		number=1000		)		)
  print(
      timeit.timeit(
          """solution_fast()"""  ,		setup="""from __main__ import solution_fast"""  ,		number=1000		)		)


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


