#K2606. Prime Power Checker
Prime Power Checker
Prime Power Checker
Your task is to determine whether a given integer n can be expressed as a prime power, i.e. in the form \(p^k\) where \(p\) is a prime number and \(k\geq1\) is an integer.
For example, \(16 = 2^4\) and \(27 = 3^3\) are prime powers, so the answer for these cases is True
, while numbers like 18 or 10 are not prime powers and the answer should be False
.
You should read the input from stdin and output the result to stdout.
inputFormat
The input consists of a single integer n (\(1 \le n \le 10^9\)).
Input is provided via standard input (stdin).
outputFormat
Output a single line: True
if n is a prime power; otherwise output False
.
Output should be written to standard output (stdout).
## sample16
True