#P7847. Alpha Equation Solutions Count and Specific Solution

    ID: 21032 Type: Default 1000ms 256MiB

Alpha Equation Solutions Count and Specific Solution

Alpha Equation Solutions Count and Specific Solution

Given positive integers \(a, b, c\) satisfying the \(\alpha\) equation

\[ \frac{1}{a} - \frac{1}{b} = \frac{1}{c} \]

and \(\gcd(a,b,c)=1\), count the number of solutions (\(\alpha\) equations) with \(c \le N\).

Additionally, among the solutions with \(c = N\), select one solution where \(a\) is minimized and output the corresponding \(b\).

Note: It is guaranteed that for \(N \ge 2\) there is at least one solution.

inputFormat

The input consists of a single positive integer \(N\) on one line.

outputFormat

Output two integers separated by a space: the total count of solutions with \(c \le N\) and the value of \(b\) corresponding to the solution with \(c = N\) that has the smallest \(a\).

sample

2
1 2

</p>