

import itertools

def      a__	(						UpperCAmelCase				:     Tuple     )    ->		Optional[int]:
  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      a__	(						)    ->		str:
  return sum(
      {
          int(''''''.join(pandigital[5:9]     )     )
          for pandigital in itertools.permutations('''123456789'''     )
          if is_combination_valid(UpperCAmelCase     )
      }     )


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








def      a__	(						UpperCAmelCase				:     list     )    ->		list:
  UpperCAmelCase			:				Tuple										=					len(UpperCAmelCase     )

  # 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			:				int										=					int(gap / shrink     )

    # Sort the elements using insertion sort
    for i in range(UpperCAmelCase							,					len(UpperCAmelCase     )     ):
      UpperCAmelCase			:				Union[str, Any]										=					collection[i]
      UpperCAmelCase			:				List[Any]										=					i
      while j >= gap and collection[j - gap] > temp:
        UpperCAmelCase			:				int										=					collection[j - gap]
        j -= gap
      UpperCAmelCase			:				List[Any]										=					temp

  return collection


if __name__ == "__main__":
     import doctest

     doctest.testmod()





