Count ordered pairs of positive integers (X, Y) satisfying 1/N! = 1/X + 1/Y, printing the exact value with no modulus.
You are given a positive integer NNN. Write a program that counts the ordered pairs of positive integers (X,Y)(X, Y)(X,Y) satisfying the equation below.
1N!=1X+1Y\frac{1}{N!} = \frac{1}{X} + \frac{1}{Y}N!1=X1+Y1
Order matters. When X≠YX \ne YX=Y, the pairs (X,Y)(X, Y)(X,Y) and (Y,X)(Y, X)(Y,X) count as two different solutions.
The first line contains the integer NNN (1≤N≤1041 \le N \le 10^41≤N≤104).
Print the number of solutions on the first line. The count grows very large, so print the exact value without taking any modulus.