시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB51423480.952%

문제

A semiperfect number is a number that all or some of the divisors (not including itself) of the number can be added together to get the original number. For instance, the number 12 has the following applicable divisors: 1, 2, 3, 4, 6. The divisors 6, 4, and 2 can be added together to get 12, therefore 12 is a semiperfect number. Given a number, determine whether or not it is semiperfect.

입력

The first line of input will contain a single integer n that indicates the number of lines to follow. Each line will consist of a single integer m (1 < m < 1000000), which will be the number that you are required to determine to be semiperfect or not semiperfect.

출력

If m is semiperfect print “Semiperfect”, otherwise, print “NOT Semiperfect”.

예제 입력 1

4
3
6
32
228

예제 출력 1

NOT Semiperfect
Semiperfect
NOT Semiperfect
Semiperfect