#K45507. Perfect Sixth Power
Perfect Sixth Power
Perfect Sixth Power
You are given a positive integer ( N ). Your task is to find the smallest integer ( M ) such that ( M \ge N ) and ( M ) is both a perfect square and a perfect cube.
Note that a number that is both a perfect square and a perfect cube is actually a perfect sixth power because ( M = i^2 ) and ( M = j^3 ) implies ( M = k^6 ) for some integer ( k ).
Input is taken from standard input and output should be printed to standard output.
inputFormat
The input consists of one line containing a single integer ( N ) (1 ( \le N \le 10^{12} )).
outputFormat
Output a single line with the smallest integer ( M ) that is greater than or equal to ( N ) and is a perfect sixth power.## sample
35
64
</p>