#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;
vector<long long>v, w; int n;
long long gcd(long long a, long long b) {
	if (b == 0)return a;
	return gcd(b, a%b);
}
int main() {
	while (true) {
		cin >> n; if (n == 0)break; v.clear(); w.clear();
		for (int i = 0; i < (n + 1)*n / 2; i++) {
			long long r; cin >> r; v.push_back(r);
			if (r % 2 == 1)w.push_back(r);
		}
		sort(v.begin(), v.end()); sort(w.begin(), w.end()); long long H = -1;
		for (int i = 0; i < v.size(); i++) {
			if (v[i] % 2 == 0) {
				if (H == -1)H = v[i];
				else H = gcd(H, v[i]);
			}
		}
		vector<long long>J;
		for (int i = 0; i < v.size(); i++) {
			if (v[i] % 2 == 0) { J.push_back(v[i] / H); }
		}
		sort(J.begin(), J.end());
		long long U1 = J[0] * J[1];
		long long U2 = sqrtl(w[0] / U1);
		H /= U2; cout << H << endl;
		for (int i = 0; i < J.size(); i++) { if (i)cout << ' '; cout << J[i] * U2; }cout << endl;
	}
	return 0;
}
### Prompt

In CPP, your task is to solve the following problem:

Problem H: Squid Multiplication

Squid Eiko loves mathematics. Especially she loves to think about integer. One day, Eiko found a math problem from a website.

"A sequence b ={ai + aj | i < j } is generated from a sequence a ={a0 , ... , an | ai is even if i is 0, otherwise ai is odd}. Given the sequence b , find the sequence a ."

This problem is easy for Eiko and she feels boring. So, she made a new problem by modifying this problem .

"A sequence b ={ai *aj | i < j } is generated from a sequence a ={ a0, ... , an | ai is even if  i  is 0, otherwise ai is odd}. Given the sequence b , find the sequence a ."

Your task is to solve the problem made by Eiko.



Input

Input consists of multiple datasets.
Each dataset is given by following formats.


n
b0 b1 ... bn*(n+1)/2-1


n is the number of odd integers in the sequence a. The range of n is 2 ≤ n ≤ 250. bi is separated by a space. Each bi is 1 ≤ bi ≤ 263-1. The end of the input consists of a single 0.

Output

For each dataset, you should output two lines. First line contains a0, an even number in the sequence a. The second line contains n odd elements separated by a space. The odd elements are sorted by increasing order. You can assume that the result is greater than or equal to 1 and less than or equal to 231-1.

Example

Input

3
6 10 14 15 21 35
2
30 42 35
0


Output

2
3 5 7
6
5 7

### Response

```cpp
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;
vector<long long>v, w; int n;
long long gcd(long long a, long long b) {
	if (b == 0)return a;
	return gcd(b, a%b);
}
int main() {
	while (true) {
		cin >> n; if (n == 0)break; v.clear(); w.clear();
		for (int i = 0; i < (n + 1)*n / 2; i++) {
			long long r; cin >> r; v.push_back(r);
			if (r % 2 == 1)w.push_back(r);
		}
		sort(v.begin(), v.end()); sort(w.begin(), w.end()); long long H = -1;
		for (int i = 0; i < v.size(); i++) {
			if (v[i] % 2 == 0) {
				if (H == -1)H = v[i];
				else H = gcd(H, v[i]);
			}
		}
		vector<long long>J;
		for (int i = 0; i < v.size(); i++) {
			if (v[i] % 2 == 0) { J.push_back(v[i] / H); }
		}
		sort(J.begin(), J.end());
		long long U1 = J[0] * J[1];
		long long U2 = sqrtl(w[0] / U1);
		H /= U2; cout << H << endl;
		for (int i = 0; i < J.size(); i++) { if (i)cout << ' '; cout << J[i] * U2; }cout << endl;
	}
	return 0;
}
```