






"""simple docstring"""



from __future__ import annotations

from collections import Counter
def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  int   ):





  '''simple docstring'''





  lowercase							   =	[True] * n
  lowercase							   =	False
  lowercase							   =	False
  lowercase							   =	True

  for i in range(3		, int(n**0.5 + 1   )		, 2   ):
    lowercase							   =	i * 2
    while index < n:
      lowercase							   =	False
      lowercase							   =	index + i

  lowercase							   =	[2]

  for i in range(3		, __snake_case		, 2   ):
    if is_prime[i]:
      primes.append(__snake_case   )

  return primes
def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  int   ):





  '''simple docstring'''





  lowercase							   =	str(__snake_case   )
  lowercase							   =	[]
  lowercase							   =	['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']

  for duplicate in Counter(__snake_case   ) - Counter(set(__snake_case   )   ):
    lowercase							   =	[int(number_str.replace(__snake_case		, __snake_case   )   ) for digit in digits]
    replacements.append(__snake_case   )

  return replacements
def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  int = 8   ):





  '''simple docstring'''





  lowercase							   =	set()

  # Filter primes with less than 3 replaceable digits
  lowercase							   =	{
      x for x in set(prime_sieve(1_00_00_00   )   ) if len(str(__snake_case   )   ) - len(set(str(__snake_case   )   )   ) >= 3
  }

  for prime in primes:
    if prime in numbers_checked:
      continue

    lowercase							   =	digit_replacements(__snake_case   )

    for family in replacements:
      numbers_checked.update(__snake_case   )
      lowercase							   =	primes.intersection(__snake_case   )

      if len(__snake_case   ) != family_length:
        continue

      return min(__snake_case   )

  return -1


if __name__ == "__main__":
    print(solution())










"""simple docstring"""



def 						_SCREAMING_SNAKE_CASE			(   ):





  '''simple docstring'''





  for a in range(3_00   ):
    for b in range(a + 1		, 4_00   ):
      for c in range(b + 1		, 5_00   ):
        if (a + b + c) == 10_00 and (a**2) + (b**2) == (c**2):
          return a * b * c

  return -1
def 						_SCREAMING_SNAKE_CASE			(   ):





  '''simple docstring'''





  for a in range(3_00   ):
    for b in range(4_00   ):
      lowercase							   =	10_00 - a - b
      if a < b < c and (a**2) + (b**2) == (c**2):
        return a * b * c

  return -1
def 						_SCREAMING_SNAKE_CASE			(   ):





  '''simple docstring'''





  import timeit

  print(
      timeit.timeit('solution()'		, setup='from __main__ import solution'		, number=10_00   )   )
  print(
      timeit.timeit(
          'solution_fast()'		, setup='from __main__ import solution_fast'		, number=10_00   )   )


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


