P5253 [JSOI2013] Diophantus
Background
Diophantus was a famous mathematician in Egypt during the Alexandrian period. He was one of the earliest mathematicians to study indeterminate equations with integer coefficients.
To honor him, such equations are generally called Diophantine equations. One of the most famous Diophantine equations is
$$x^n+y^n=z^n$$
Fermat proposed that for $n>2$, $x,y,z$ have no positive integer solutions. This is called “Fermat's Last Theorem”, and its proof was not completed until recently by Andrew Wiles (AndrewWiles).
Description
Consider the following Diophantine equation:
$$\frac{1}{x}~+~\frac{1}{y}~=~\frac{1}{n}~,(x,y,n~\in~\mathbb{N}^+)$$
Xiao G is very interested in the following question: for a given positive integer $n$, how many essentially different solutions satisfy the equation above? For example, when $n=4$, there are three essentially different solutions $(x~\leq~y)$:
> $\frac{1}{5}+\frac{1}{20}~=~\frac{1}{4}$
>
> $\frac{1}{6}+\frac{1}{12}~=~\frac{1}{4}$
>
> $\frac{1}{8}+\frac{1}{8}~=~\frac{1}{4}$
Obviously, for larger $n$, it is meaningless to list all essentially different solutions. Can you help Xiao G quickly find, for a given $n$, the number of essentially different solutions to the equation above?
Input Format
One line with only one integer $n$.
Output Format
Output one line with one integer, representing the answer.
Explanation/Hint
#### Constraints
For all testdata, it is guaranteed that $1 \leq n \leq 10^{14}$.
Translated by ChatGPT 5