


"""simple docstring"""







import itertools


def 	lowercase     (							A_			)-> Dict:
  '''simple docstring'''







  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 	lowercase     (							)-> Optional[int]:
  '''simple docstring'''







  return sum(
      {
          int("".join(pandigital[5:9]			)			)
          for pandigital in itertools.permutations("123456789"			)
          if is_combination_valid(A_			)
      }			)


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










"""simple docstring"""







def 	lowercase     (							A_ = 100    ,  A_ = 100			)-> int:
  '''simple docstring'''







  return max(
      sum(int(A_			) for x in str(base**power			)			)
      for base in range(A_			)
      for power in range(A_			)			)


# Tests
if __name__ == "__main__":
 import doctest

 doctest.testmod()






