'''simple docstring'''


import itertools


def    _lowerCamelCase       ( lowerCamelCase_   :				List[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    _lowerCamelCase       ( ):



     """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'''


def    _lowerCamelCase       ( lowerCamelCase_   :				list  ):



     """simple docstring"""





     UpperCAmelCase_				:  Optional[int]  = len(lowerCamelCase_  )

     # Set the gap value to be decreased by a factor of 1.3
     # after each iteration
     UpperCAmelCase_				:  Optional[Any]  = 1.3

     # Continue sorting until the gap is 1
     while gap > 1:
          # Decrease the gap value
          UpperCAmelCase_				:  Optional[Any]  = int(gap / shrink  )

          # Sort the elements using insertion sort
          for i in range(lowerCamelCase_      ,	len(lowerCamelCase_  )  ):
               UpperCAmelCase_				:  Optional[int]  = collection[i]
               UpperCAmelCase_				:  Tuple  = i
               while j >= gap and collection[j - gap] > temp:
                    UpperCAmelCase_				:  Tuple  = collection[j - gap]
                    j -= gap
               UpperCAmelCase_				:  Optional[int]  = temp

     return collection


if __name__ == "__main__":
 import doctest

 doctest.testmod()






