138. Perfect Numbers
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
This problem is worth 15 points.

A number is considered a perfect number if and only if the sum of its divisors, except for the number itself, is equal to the original number. For example, 28 is a perfect number because its divisors are $$$1$$$, $$$2$$$, $$$4$$$, $$$7$$$, and $$$14$$$, and $$$1$$$ + $$$2$$$ + $$$4$$$ + $$$7$$$ + $$$14$$$ = $$$28$$$.

Given an integer $$$n$$$, figure out whether or not it is a perfect number, and what the sum of its divisors (except for $$$n$$$) is.

Input

The only line of input consists of a single integer $$$n$$$.

Output

Output two lines.

On the first line, output "PERFECT NUMBER" (no quotes) if the number is a perfect number, and "NOT A PERFECT NUMBER" (no quotes) if the number is not a perfect number. On the second line, output the sum of divisors of the number.

Examples
Input
28
Output
PERFECT NUMBER
28
Input
48
Output
NOT A PERFECT NUMBER
76
Note

All numbers used in calculations are guaranteed to fit inside of a Java "int" data type.