Problem B
Divisor Shuffle
All the positive divisors of two integers $A$ and $B$ were written down together in a list. The numbers on the list were then shuffled around. Can you determine what $A$ and $B$ were, based on the list?
Input
The first line contains an integer $N$ ($1 \le N \le 210,000$), the number of divisors on the list.
The next line contains the list of divisors, separated by spaces. All divisors are between $1$ and $10^{18}$.
Output
Output the two integers $A$ and $B$ – the smaller one first. If there are multiple possible $A$ and $B$, you may output any ones.
Explanation of samples
The divisors of $12$ are $1$, $2$, $3$, $4$, $6$ and $12$. The divisors of $8$ are $1$, $2$, $4$ and $8$.
Sample Input 1 | Sample Output 1 |
---|---|
10 8 1 2 12 1 2 6 4 3 4 |
8 12 |