| BSUIR Open X. Reload. Students final |
|---|
| Finished |
Once Maxim Vitalievich decided to deal with ordinary fractions. After quite a long study of the theory, he came up with an entertaining problem. Given the following equation:
$$$$$$ \frac{1}{a} + \frac{1}{b} = \frac{c}{k} $$$$$$
It is necessary to determine for a given integer $$$k$$$ the number of triplets of positive integers $$$a$$$, $$$b$$$ and $$$c$$$ that are the solution of this equation such that $$$a \le b$$$.
Maksim Vitalievich solved this problem for a given number $$$k$$$ and now he is wondering at what $$$k$$$ ($$$1 \le k \le r$$$) the number of solutions will be maximum.
The single line contains a single integer $$$r$$$ — the right bound for the number $$$k$$$.
$$$$$$ 1 \le r \le 10^9 $$$$$$
In a single line print two space-separated integers $$$k$$$ and $$$s$$$ ($$$1 \le k \le r$$$) — the value at which the largest number of solutions and the number of solutions for the number $$$k$$$ are achieved.
If there are several solutions, then print the solution where $$$k$$$ is the smallest.
3
3 7
5
4 10
In the first example, for $$$k = 3$$$ there are the following solutions:
$$$(1, 1, 6)$$$, $$$(2, 2, 3)$$$, $$$(3, 3, 2)$$$, $$$(6, 6, 1)$$$, $$$(1, 3, 4)$$$, $$$(2, 6, 2)$$$, $$$(4, 12, 1)$$$.
| Name |
|---|


