Hide

Problem I
Power of Divisors

Consider a positive integer $n$. Let $f(n)$ be the number of positive integer divisors of $n$. For example, if $n=8$ then $f(n)=4$, since the divisors of $8$ are $1$, $2$, $4$ and $8$.

Now, consider a positive integer $x$. What is the smallest value of $n$ such that $n^{f(n)}=x$?

Input

The single line of input contains a single integer $x$ ($1 \le x \le 10^{18}$). This is the $x$ of the statement above.

Output

Output a single integer, which is the smallest value of $n$ such that $n^{f(n)}=x$, or $-1$ if no such value of $n$ exists.

Sample Input 1 Sample Output 1
15625
25
Sample Input 2 Sample Output 2
64000000
20
Sample Input 3 Sample Output 3
65536
-1

Please log in to submit a solution to this problem

Log in