406792: GYM102556 H Riana and Humongous Numbers

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

H. Riana and Humongous Numberstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Riana got really bored one day and decided to play with some integers. She started with the positive integer $$$N$$$. She then noticed that $$$N$$$ was too small and boring. Suddenly, she got the idea to create a really big integer. To do so, she multiplied all of the positive divisors of $$$N$$$ and got the integer $$$M$$$. After getting the value of $$$M$$$, she challenged her friend Cisco to determine the value of the original integer $$$N$$$ given $$$M$$$. Help Cisco find the value of $$$N$$$.

Input

The input contains one line containing the integer $$$M$$$. It is guaranteed that $$$M$$$ is a positive integer less than $$$10^{15}$$$.

Output

Output the original integer $$$N$$$ if possible. Otherwise, output $$$-1$$$.

ExamplesInput
8
Output
4
Input
4
Output
-1
Note

In the first test case, the positive divisors of 4 are 1, 2, and 4. The product is 8.

In the second test case, there is no integer whose product of its positive divisors is 4.

加入题单

上一题 下一题 算法标签: