





"""simple docstring"""




from __future__ import annotations





def 		UpperCAmelCase__						(	_UpperCAmelCase   ):






  """simple docstring"""





  A_    :			Union[str, Any]									=    [0] * max_one

  for i in range(0					,   _UpperCAmelCase   ):
    A_    :			str									=    i

  for i in range(2					,   _UpperCAmelCase   ):
    if totients[i] == i:
      for j in range(_UpperCAmelCase					,   _UpperCAmelCase					,   _UpperCAmelCase   ):
        totients[j] -= totients[j] // i

  return totients





def 		UpperCAmelCase__						(	_UpperCAmelCase					,   _UpperCAmelCase   ):






  """simple docstring"""





  return sorted(str(_UpperCAmelCase   )   ) == sorted(str(_UpperCAmelCase   )   )





def 		UpperCAmelCase__						(	_UpperCAmelCase = 10000000   ):






  """simple docstring"""





  A_    :			Any									=    1  # i
  A_    :			Optional[Any]									=    0  # φ(i)
  A_    :			Any									=    get_totients(max_n + 1   )

  for i in range(2					,   max_n + 1   ):
    A_    :			str									=    totients[i]

    if i * min_denominator < min_numerator * t and has_same_digits(_UpperCAmelCase					,   _UpperCAmelCase   ):
      A_    :			Tuple									=    i
      A_    :			Union[str, Any]									=    t

  return min_numerator


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







"""simple docstring"""







from itertools import combinations, product





def 							SCREAMING_SNAKE_CASE							(   lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_):
					if xa == ya == 0 or xa == ya == 0:
										return False
					a__ 							=	xa * xa + ya * ya
					a__ 							=	xa * xa + ya * ya
					a__ 							=	(xa - xa) * (xa - xa) + (ya - ya) * (ya - ya)
					return (
					    a_square + b_square == c_square
					    or a_square + c_square == b_square
					    or b_square + c_square == a_square
					)





def 							SCREAMING_SNAKE_CASE							(   lowerCamelCase_ = 50):
					return sum(
					    1
					    for pta, pta in combinations(product(range(limit + 1)			,  repeat=2)			,  2)
					    if is_right(*lowerCamelCase_			,  *lowerCamelCase_))


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


