#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;
typedef long long ll;

ll gcd(ll m, ll n){
	if(m < n){ return gcd(n, m); }
	if(n == 0){ return m; }
	if(m % n == 0){ return n; }
	return gcd(n, m % n);
}

int main(){
	while(true){
		int N;
		cin >> N;
		if(N == 0){ break; }
		int cnt = N * (N + 1) / 2;
		vector<ll> b(cnt);
		ll smallestOdd = 0x7fffffffffffffffll;
		for(int i = 0; i < cnt; ++i){
			cin >> b[i];
			if(b[i] % 2 == 1){ smallestOdd = min(smallestOdd, b[i]); }
		}
		ll a0 = 0;
		for(int i = 0; i < cnt; ++i){
			if(b[i] % 2 == 0){ a0 = ((a0 == 0) ? b[i] : gcd(a0, b[i])); }
		}
		vector<ll> a;
		for(int i = 0; i < cnt; ++i){
			if(b[i] % 2 == 0){ a.push_back(b[i] / a0); }
		}
		sort(a.begin(), a.end());
		ll mul = sqrt(smallestOdd / (a[0] * a[1]));
		cout << a0 / mul << endl;
		for(int i = 0; i < a.size(); ++i){
			cout << a[i] * mul;
			if(i != a.size() - 1){ cout << " "; }
		}
		cout << endl;
	}
	return 0;
}
### Prompt

Your task is to create a CPP solution to 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;
typedef long long ll;

ll gcd(ll m, ll n){
	if(m < n){ return gcd(n, m); }
	if(n == 0){ return m; }
	if(m % n == 0){ return n; }
	return gcd(n, m % n);
}

int main(){
	while(true){
		int N;
		cin >> N;
		if(N == 0){ break; }
		int cnt = N * (N + 1) / 2;
		vector<ll> b(cnt);
		ll smallestOdd = 0x7fffffffffffffffll;
		for(int i = 0; i < cnt; ++i){
			cin >> b[i];
			if(b[i] % 2 == 1){ smallestOdd = min(smallestOdd, b[i]); }
		}
		ll a0 = 0;
		for(int i = 0; i < cnt; ++i){
			if(b[i] % 2 == 0){ a0 = ((a0 == 0) ? b[i] : gcd(a0, b[i])); }
		}
		vector<ll> a;
		for(int i = 0; i < cnt; ++i){
			if(b[i] % 2 == 0){ a.push_back(b[i] / a0); }
		}
		sort(a.begin(), a.end());
		ll mul = sqrt(smallestOdd / (a[0] * a[1]));
		cout << a0 / mul << endl;
		for(int i = 0; i < a.size(); ++i){
			cout << a[i] * mul;
			if(i != a.size() - 1){ cout << " "; }
		}
		cout << endl;
	}
	return 0;
}
```