


'''simple docstring'''






from __future__ import annotations





def lowerCamelCase__			(						__lowerCamelCase       :							int							):







   '''simple docstring'''




   _UpperCAmelCase   :   List[str]							    =[0] * max_one

   for i in range(0       ,    __UpperCamelCase							):
      _UpperCAmelCase   :   List[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 lowerCamelCase__			(						__lowerCamelCase       :							Optional[int]       ,    __lowerCamelCase       :							Union[str, Any]							):







   '''simple docstring'''




   return sorted(str(__UpperCamelCase							)							) == sorted(str(__UpperCamelCase							)							)





def lowerCamelCase__			(						__lowerCamelCase       :							str = 1_0_0_0_0_0_0_0							):







   '''simple docstring'''




   _UpperCAmelCase   :   Any							    =1  # i
   _UpperCAmelCase   :   str							    =0  # φ(i)
   _UpperCAmelCase   :   Any							    =get_totients(max_n + 1							)

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

      if i * min_denominator < min_numerator * t and has_same_digits(__UpperCamelCase       ,    __UpperCamelCase							):
         _UpperCAmelCase   :   int							    =i
         _UpperCAmelCase   :   Tuple							    =t

   return min_numerator


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



"""simple docstring"""


import itertools



def     _lowerCamelCase(__UpperCamelCase       )				-> List[str]:
	return (
	    int("""""".join(combination[0:2]       )       ) * int("""""".join(combination[2:5]       )       )
	    == int("""""".join(combination[5:9]       )       )
	) or (
	    int("""""".join(combination[0]       )       ) * int("""""".join(combination[1:5]       )       )
	    == int("""""".join(combination[5:9]       )       )
	)



def     _lowerCamelCase()				-> Dict:
	return sum(
	    {
	        int("""""".join(pandigital[5:9]       )       )
	        for pandigital in itertools.permutations("""123456789"""       )
	        if is_combination_valid(__UpperCamelCase       )
	    }       )


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



