Possible solution but TLE for Problem 10139 - Factivisors