#K64917. Flower Grid Arrangement
Flower Grid Arrangement
Flower Grid Arrangement
You are given an integer representing the total number of flowers. Your task is to determine whether it is possible to arrange the flowers into a grid which forms a perfect square, and each row and column contains an even number of flowers. In mathematical terms, you need to check if (n = (2k)^2 = 4k^2) for some integer (k). If this condition holds, print POSSIBLE
; otherwise, print IMPOSSIBLE
.
inputFormat
The first line of input contains an integer (T) representing the number of test cases. This is followed by (T) lines, each containing a single integer (n) which is the total number of flowers.
outputFormat
For each test case, output a single line with either POSSIBLE
if the number of flowers can be arranged in the desired grid or IMPOSSIBLE
otherwise.## sample
3
4
16
20
POSSIBLE
POSSIBLE
IMPOSSIBLE
</p>