CF1062B.Math
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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 n (to apply this operation, 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?
输入格式
The only line of the input contains a single integer n ( 1≤n≤106 ) — the initial number.
输出格式
Print two integers: the minimum integer n that can be achieved using the described operations and the minimum number of operations required.
输入输出样例
输入#1
20
输出#1
10 2
输入#2
5184
输出#2
6 4
说明/提示
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 106 , it can still become greater than 106 after applying one or more operations.