Perfect Numbers in an Array


Submit solution

Points: 100
Time limit: 2.0s
Memory limit: 256M

Author:
Problem types

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

There are no comments at the moment.