from functools import reduce import util target = 600851475143 factors = util.find_prime_factors(target) result = reduce((lambda x, y: x * y), factors) print(result) print(result == target)