시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB161795448.214%

문제

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$?

입력

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 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.

예제 입력 1

15625

예제 출력 1

25

예제 입력 2

64000000

예제 출력 2

20

예제 입력 3

65536

예제 출력 3

-1