


'''simple docstring'''

import itertools

def _SCREAMING_SNAKE_CASE				(A	)	->	Optional[Any]:






       """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 _SCREAMING_SNAKE_CASE				()	->	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 _SCREAMING_SNAKE_CASE				(A	)	->	list:






       """simple docstring"""







       lowercase__				      =			len(A	)

       # Set the gap value to be decreased by a factor of 1.3
       # after each iteration
       lowercase__				      =			1.3

       # Continue sorting until the gap is 1
       while gap > 1:
              # Decrease the gap value
              lowercase__				      =			int(gap / shrink	)

              # Sort the elements using insertion sort
              for i in range(A  ,			len(A	)	):
                     lowercase__				      =			collection[i]
                     lowercase__				      =			i
                     while j >= gap and collection[j - gap] > temp:
                            lowercase__				      =			collection[j - gap]
                            j -= gap
                     lowercase__				      =			temp

       return collection


if __name__ == "__main__":
 import doctest

 doctest.testmod()




