'''simple docstring'''

import itertools


def 					UpperCAmelCase__      (							_lowerCAmelCase						: List[str])						->		str:



						"""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 					UpperCAmelCase__      (							)						->		int:



						"""simple docstring"""

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


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






'''simple docstring'''

from math import sqrt


def 					UpperCAmelCase__      (							_lowerCAmelCase						: int)						->		list[int]:



						"""simple docstring"""

						snake_case   :					Dict							=						[1]
						for i in range(2,			int(sqrt(_lowerCAmelCase)) + 1,			1):
												if number % i == 0:
																		values.append(_lowerCAmelCase)
																		if int(number // i) != i:
																								values.append(int(number // i))
						return sorted(_lowerCAmelCase)


def 					UpperCAmelCase__      (							_lowerCAmelCase						: int)						->		bool:



						"""simple docstring"""

						return sum(factors(_lowerCAmelCase)) > n


def 					UpperCAmelCase__      (							_lowerCAmelCase						: int)						->		bool:



						"""simple docstring"""

						snake_case   :					Dict							=						factors(_lowerCAmelCase)
						snake_case   :					List[str]							=						len(_lowerCAmelCase)
						snake_case   :					Optional[Any]							=						[[0 for i in range(number + 1)] for j in range(r + 1)]
						for i in range(r + 1):
												snake_case   :					int							=						True

						for i in range(1,			number + 1):
												snake_case   :					List[Any]							=						False

						for i in range(1,			r + 1):
												for j in range(1,			number + 1):
																		if j < values[i - 1]:
																								snake_case   :					Union[str, Any]							=						subset[i - 1][j]
																		else:
																								snake_case   :					Tuple							=						subset[i - 1][j] or subset[i - 1][j - values[i - 1]]

						return subset[r][number] != 0


def 					UpperCAmelCase__      (							_lowerCAmelCase						: int)						->		bool:



						"""simple docstring"""

						return abundant(_lowerCAmelCase) and not semi_perfect(_lowerCAmelCase)


if __name__ == "__main__":
						import doctest

						doctest.testmod(verbose=True)
						for number in (69, 70, 71):
												print(f"{number} is {'' if weird(number) else 'not '}weird.")





