D. Divisor Sequence
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

For this problem, you will find the sum of the proper divisors of a number excluding the number itself. For example, the sum of the divisors of $$$n=10$$$ is $$$5+2+1=8$$$. This process can be repeated until there are no more divisors in the sum. See the case for $$$n=10$$$:

  1. Sum of the divisors of $$$10$$$: $$$5 + 2 + 1 = 8$$$.
  2. Sum of the divisors of $$$8$$$: $$$4 + 2 + 1 = 7$$$.
  3. Sum of the divisors of $$$7$$$: $$$1$$$.
  4. Sum of the divisors of $$$1$$$: $$$0$$$.

Numbers can be classified according to the behavior of the sum of their divisors. For now, the following types of numbers will be considered:

  • "perfectos". These are numbers whose sum of divisors equals the number itself. For example, the sum of the divisors of 6 is $$$3+2+1=6$$$.
  • "romanticos". If the sum of the divisors of a number gives a different number, and the sum of the divisors of this latter number gives the original number, then the number is said to be romantic. For example, the sum of the divisors of $$$220$$$ is $$$284$$$, and the sum of the divisors of $$$284$$$ is $$$220$$$; both are romantic numbers.
  • "abundantes". These are numbers whose sum of divisors is strictly greater than the number itself. For example, the sum of the divisors of $$$12$$$ is $$$6+4+3+2+1=16$$$; $$$12$$$ is an abundant number.
  • "complicados". These are numbers that are not "perfectos", "romanticos", nor "abundantes".

You will be given a list of numbers and you must classify them according to the type of number they are.

In the case that a number is both "romantico" and "abundante", you should print its classification as "romantico" first and then as "abundante". See the example cases for clarity.

Input

The first line contains an integer $$$n$$$ ($$$1 \leq n \leq 10^5$$$), indicating the number of numbers to be classified.

The following $$$n$$$ lines each contain an integer $$$a_i$$$ ($$$1 \leq a_i \leq 10^5$$$), indicating the number to be classified.

Output

For each number, you must print a line with the number followed by its classification. The number and each classification should be separated by a space.

Example
Input
5
28
220
276
1
287
Output
28 perfecto
220 romantico abundante
276 abundante
1 complicado
287 complicado