You may have made a trivial mistake: You calculated the number xx of divisors which is a huge number, then calculated xx modulo (10^7+310⁷+3). You want to an avoid the biggest number.
Let x2x2 be the product of the first two numbers of the solution, then replace x2x2 with x2x2 modulo (10^7+310⁷+3). Let x3x3 = x2x2 multiplied by the third number in the product etc. This avoids the large numbers.
In C or C++ arbitrary large numbernumbers are not supported. You will get a result very quickly that is completely wrong.