






"""simple docstring"""






import itertools




def 						_UpperCamelCase			(  A			):
			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			(  ):
			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 .hash_table import HashTable
from .number_theory.prime_numbers import is_prime, next_prime
class 						__lowerCAmelCase   (			UpperCAmelCase       ):







  '''simple docstring'''


  def __init__(      self:		List[Any]				,			*UpperCamelCase_:		Dict				,			**UpperCamelCase_:		Optional[int]					):
     super().__init__(*UpperCamelCase_				,			**UpperCamelCase_					)
  def 					UpperCamelCase__   (      self:		Any				,			UpperCamelCase_:		Optional[int]				,			UpperCamelCase_:		Optional[int]					):
     UpperCamelCase_     =(
         next_prime(value % self.size_table					)
         if not is_prime(value % self.size_table					)
         else value % self.size_table
     )  # gt = bigger than
     return next_prime_gt - (data % next_prime_gt)
  def 					UpperCamelCase__   (      self:		str				,			UpperCamelCase_:		List[str]				,			UpperCamelCase_:		str				,			UpperCamelCase_:		Tuple					):
     return (increment * self.__hash_function_a(UpperCamelCase_				,			UpperCamelCase_					)) % self.size_table





  def 					UpperCamelCase__   (      self:		str				,			UpperCamelCase_:		int				,			UpperCamelCase_:		str=None					):
     UpperCamelCase_     =1
     UpperCamelCase_     =self.hash_function(UpperCamelCase_					)

     while self.values[new_key] is not None and self.values[new_key] != key:
        UpperCamelCase_     =(
            self.__hash_double_function(UpperCamelCase_				,			UpperCamelCase_				,			UpperCamelCase_					)
            if self.balanced_factor() >= self.lim_charge
            else None
        )
        if new_key is None:
           break
        else:
           i += 1

     return new_key
