Deficient, Perfect, and Abundant

No attempts yetTime limit1sMemory limit128 MB

Problem

Read several positive integers and, for each one, determine whether it is deficient, perfect, or abundant.

The proper divisors of a positive integer $n$ are its divisors that include $1$ but exclude $n$ itself. Let $s$ be the sum of the proper divisors of $n$. Then:

  • if $s = n$, the number is perfect;
  • if $s < n$, the number is deficient;
  • if $s > n$, the number is abundant.

For example, the proper divisors of $6$ are $1, 2, 3$, and their sum is $6$, so $6$ is a perfect number.

Input

The first line contains the number of integers that follow. Each of the next lines contains one integer. Every input integer is greater than $1$ and less than $32500$ (that is, $2 \le n \le 32499$).

Output

For each integer, output the number together with its classification on its own line:

  • n is a deficient number. if it is deficient;
  • n is a perfect number. if it is perfect;
  • n is an abundant number. if it is abundant.

Here n is the input value. Print one blank line between consecutive results.