#K11706. Perfect Power Detection
Perfect Power Detection
Perfect Power Detection
In this problem, you are given an integer ( n ) and you have to determine whether it is a perfect power. A number ( n ) is called a perfect power if there exist integers ( a \ge 2 ) and ( b \ge 2 ) such that ( n = a^b ).
If such a pair exists, print the two integers ( a ) and ( b ) separated by a space. Otherwise, output None
.
inputFormat
The input consists of a single integer ( n ) given via standard input.
outputFormat
If ( n ) is a perfect power, output the integers ( a ) and ( b ) separated by a space. Otherwise, output the string None
.## sample
9
3 2