Codeforces Round 520 (Div. 2)
B
Math
Codeforces
1500
原题
← AC →
翻译中…

JATC's math teacher always gives the class some interesting math problems so that they don't get bored. Today the problem is as follows. Given an integer $n$, you can perform the following operations zero or more times:

翻译中…
  • mul $x$: multiplies $n$ by $x$ (where $x$ is an arbitrary positive integer).
  • sqrt: replaces $n$ with $\sqrt{n}$ (to apply this operation, $\sqrt{n}$ must be an integer).
翻译中…

You can perform these operations as many times as you like. What is the minimum value of $n$, that can be achieved and what is the minimum number of operations, to achieve that minimum value?

翻译中…

Apparently, no one in the class knows the answer to this problem, maybe you can help them?

翻译中…

Input

翻译中…

The only line of the input contains a single integer $n$ ($1 \le n \le 10^6$) — the initial number.

翻译中…

Output

翻译中…

Print two integers: the minimum integer $n$ that can be achieved using the described operations and the minimum number of operations required.

翻译中…

Note

翻译中…

In the first example, you can apply the operation mul $5$ to get $100$ and then sqrt to get $10$.

翻译中…

In the second example, you can first apply sqrt to get $72$, then mul $18$ to get $1296$ and finally two more sqrt and you get $6$.

翻译中…

Note, that even if the initial value of $n$ is less or equal $10^6$, it can still become greater than $10^6$ after applying one or more operations.

翻译中…

样例

Input #1
20
Output #1
10 2
InputCopy OutputCopy
Input #2
5184
Output #2
6 4
InputCopy OutputCopy
题目信息
题号
1062B
时间限制
1 s
内存限制
256 MB
标签
贪心
数学
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。