2432. Largest Integer

单点时限: 10.0 sec

内存限制: 256 MB

Integer in Multiplication-Number-System is represented as multiplication of prime factor. For example , 12 represent as 2 * 2 * 3. Your task is to find the largest integer from given integer set in Multiplication-Number-System.

输入格式

Input will consist of N(0<N<20) test cases. Each test case consists of series of lines. The first line contains single integer n less than 1000. Next n lines contains positive integer(s) ai (1 < ai < 100000) in Multiplication-Number-System. Each line contains at most 1000 integers.

输出格式

Output the largest integer in Multiplication-Number-System. Each output line should be sorted in non decreasing order. After each test case, you should output a blank line.

样例

Input
2
3
2 2 3
2 3 5
2 2
2
5 5
17 17
Output
2 3 5
17 17

1 人解决,18 人已尝试。

1 份提交通过,共有 79 份提交。

9.9 EMB 奖励。

创建: 15 年,11 月前.

修改: 7 年,2 月前.

最后提交: 4 年,9 月前.

来源: ECNU 选拔 2008

题目标签