Perfect Numbers are those numbers which are equal to sum of their divisors(excluding themselves).
For example 6 is perfect number because it is equal to sum of it's divisors.
6=1+2+3, where 1,2 and 3 divides 6.
In this program given an Integer value you have to check if it is a perfect number or Not.
First Line contains Number of Test cases T
Next T lines Lines contains a positive Integer.
T lines of output.
If the ith Integer is Perfect , print PERFECT.
else print NOT PERFECT.
Each Number will be less than 10000.
Problem Setter : Arjun Singh Bhatia