#C5527. Perfect Cube Checker
Perfect Cube Checker
Perfect Cube Checker
Given an integer n, determine whether it is a perfect cube. An integer n is called a perfect cube if there exists an integer k such that \( k^3 = n \). Note that negative numbers, zero, and positive numbers can all be perfect cubes. For example, \(27\) is a perfect cube since \(3^3 = 27\), and \(-64\) is a perfect cube since \((-4)^3 = -64\).
You will be given T test cases. For each test case, output "YES" if the given number is a perfect cube and "NO" otherwise. Each answer should be printed on a new line.
inputFormat
The first line of the input contains a single integer T (the number of test cases). Each of the following T lines contains one integer n.
Input is read from standard input (stdin).
outputFormat
For each test case, output a single line with "YES" if n is a perfect cube; otherwise, output "NO". Output is written to standard output (stdout).
## sample3
27
45
-64
YES
NO
YES
</p>