Perfect Numbers in an Array
Print the perfect numbers in an array, preserving input order. A perfect number equals the sum of its positive proper divisors.
Input
The first line contains \(n\). The second line contains \(n\) positive integers.
Output
Print all perfect numbers in input order, separated by spaces. Print an empty line if none exist.
Example
Input
5
28 1 496 3 6
Output
28 496 6
Comments