#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
#include <time.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


int N;

ll calc(ll x,ll y){
	if(y == 0){
		return x;
	}else{
		return calc(y,x%y);
	}
}

void func(){

	vector<ll> GU,KI;
	ll tmp;

	int limit = (N*(N+1))/2;

	for(int i = 0; i < limit; i++){
		scanf("%lld",&tmp);
		if(tmp%2 == 0)GU.push_back(tmp);
		else{
			KI.push_back(tmp);
		}
	}

	sort(GU.begin(),GU.end());
	sort(KI.begin(),KI.end());

	ll GU_0 = GU[0],GU_1 = GU[1],KI_0 = KI[0];

	ll common;
	if(GU_0 >= KI_0){
		common = calc(GU_0,KI_0);
	}else{
		common = calc(KI_0,GU_0);
	}

	GU_0 /= common;
	KI_0 /= common;

	if(GU_1 >= KI_0){
		common = calc(GU_1,KI_0);
	}else{
		common = calc(KI_0,GU_1);
	}

	GU_1 /= common;
	KI_0 /= common;

	ll ans_GU = sqrt((GU_0*GU_1)/KI_0);

	printf("%lld\n",ans_GU);
	printf("%lld",GU[0]/ans_GU);
	for(int i = 1; i < GU.size();i++){
		printf(" %lld",GU[i]/ans_GU);
	}
	printf("\n");

}

int main(){

	while(true){
		scanf("%d",&N);
		if(N == 0)break;

		func();
	}

	return 0;
}
### Prompt

Please provide a CPP coded solution to the problem described below:

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 <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
#include <time.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


int N;

ll calc(ll x,ll y){
	if(y == 0){
		return x;
	}else{
		return calc(y,x%y);
	}
}

void func(){

	vector<ll> GU,KI;
	ll tmp;

	int limit = (N*(N+1))/2;

	for(int i = 0; i < limit; i++){
		scanf("%lld",&tmp);
		if(tmp%2 == 0)GU.push_back(tmp);
		else{
			KI.push_back(tmp);
		}
	}

	sort(GU.begin(),GU.end());
	sort(KI.begin(),KI.end());

	ll GU_0 = GU[0],GU_1 = GU[1],KI_0 = KI[0];

	ll common;
	if(GU_0 >= KI_0){
		common = calc(GU_0,KI_0);
	}else{
		common = calc(KI_0,GU_0);
	}

	GU_0 /= common;
	KI_0 /= common;

	if(GU_1 >= KI_0){
		common = calc(GU_1,KI_0);
	}else{
		common = calc(KI_0,GU_1);
	}

	GU_1 /= common;
	KI_0 /= common;

	ll ans_GU = sqrt((GU_0*GU_1)/KI_0);

	printf("%lld\n",ans_GU);
	printf("%lld",GU[0]/ans_GU);
	for(int i = 1; i < GU.size();i++){
		printf(" %lld",GU[i]/ans_GU);
	}
	printf("\n");

}

int main(){

	while(true){
		scanf("%d",&N);
		if(N == 0)break;

		func();
	}

	return 0;
}
```