#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <cstdio>
#include <queue>
#include <cmath>
#include <string.h>
#include <assert.h>
#include <stack>
#include <sstream>
#include <map>
#include <set>
#define FRE freopen("c:\\users\\sky123\\desktop\\input.txt","r",stdin)
#define FF freopen("output.txt", "w", stdout)
#define PI 3.1415926535897932384626433832795028
#define ee 2.7182818284590452354
#define pi acos(-1.0)
#define eps 1e-5
#define M 100000
#define Inf 0x80000000
#define LL long long
#define inf 100000000
using namespace std;
LL even[M],odd[M],list[M],a[M],b[M];
LL gcd(LL a,LL b)
{
	return b==0?a:gcd(b,a%b);
}
int main()
{
	LL n,m,i,x,k,l,j,y,z,bi,bj,bk,g,a0;
	bool flag,ok,flag1;
	while(scanf("%lld",&n),n)
	{
		m=n*(n+1)/2;
		k=0;
		l=0;
		for(i=0;i<m;i++)
		{
			scanf("%lld",&x);
			list[i]=x;
			if(x%2==0)
				even[k++]=x;
			else 
				odd[l++]=x;
		}
		sort(list,list+m);
		flag=true;
		for(i=0;i<k&&flag;i++)
		{
			for(j=i+1;j<k&&flag;j++)
			{
				bi=even[i];
				bj=even[j];
				bk=odd[0];
				g=gcd(bi,bk);
				bi/=g;
				bk/=g;
				//g=gcd(bj,bk);
				//bj/=g;
				//bk/=g;
				bj/=bk;
				a0=(LL)sqrt(bi*bj);
				//a0=gcd(even[i],even[j]);
				if(a0==0)
					continue;
				flag1=true;
				z=0;
				for(x=0;x<k;x++)
				{
					if(even[x]%a0!=0)
					{
						flag1=false;
						break;
					}
					a[x]=even[x]/a0;
					b[z++]=a0*a[x];
				}
				if(!flag1)
					continue;
				for(x=0;x<k;x++)
					for(y=x+1;y<k;y++)
						b[z++]=a[x]*a[y];
				sort(b,b+z);
				ok=true;
				for(x=0;x<z;x++)
				{
					if(b[x]!=list[x])
					{
						ok=false;
						break;
					}
				}
				if(ok)
				{
					printf("%lld\n",a0);
					sort(a,a+n);
					flag=false;
					for(x=0;x<n;x++)
					{
						if(x==0)
							printf("%lld",a[x]);
						else
							printf(" %lld",a[x]);
					}
					printf("\n");
				}
			}
		}
	}
	return 0;
}
### Prompt

Please create a solution in CPP 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 <algorithm>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <cstdio>
#include <queue>
#include <cmath>
#include <string.h>
#include <assert.h>
#include <stack>
#include <sstream>
#include <map>
#include <set>
#define FRE freopen("c:\\users\\sky123\\desktop\\input.txt","r",stdin)
#define FF freopen("output.txt", "w", stdout)
#define PI 3.1415926535897932384626433832795028
#define ee 2.7182818284590452354
#define pi acos(-1.0)
#define eps 1e-5
#define M 100000
#define Inf 0x80000000
#define LL long long
#define inf 100000000
using namespace std;
LL even[M],odd[M],list[M],a[M],b[M];
LL gcd(LL a,LL b)
{
	return b==0?a:gcd(b,a%b);
}
int main()
{
	LL n,m,i,x,k,l,j,y,z,bi,bj,bk,g,a0;
	bool flag,ok,flag1;
	while(scanf("%lld",&n),n)
	{
		m=n*(n+1)/2;
		k=0;
		l=0;
		for(i=0;i<m;i++)
		{
			scanf("%lld",&x);
			list[i]=x;
			if(x%2==0)
				even[k++]=x;
			else 
				odd[l++]=x;
		}
		sort(list,list+m);
		flag=true;
		for(i=0;i<k&&flag;i++)
		{
			for(j=i+1;j<k&&flag;j++)
			{
				bi=even[i];
				bj=even[j];
				bk=odd[0];
				g=gcd(bi,bk);
				bi/=g;
				bk/=g;
				//g=gcd(bj,bk);
				//bj/=g;
				//bk/=g;
				bj/=bk;
				a0=(LL)sqrt(bi*bj);
				//a0=gcd(even[i],even[j]);
				if(a0==0)
					continue;
				flag1=true;
				z=0;
				for(x=0;x<k;x++)
				{
					if(even[x]%a0!=0)
					{
						flag1=false;
						break;
					}
					a[x]=even[x]/a0;
					b[z++]=a0*a[x];
				}
				if(!flag1)
					continue;
				for(x=0;x<k;x++)
					for(y=x+1;y<k;y++)
						b[z++]=a[x]*a[y];
				sort(b,b+z);
				ok=true;
				for(x=0;x<z;x++)
				{
					if(b[x]!=list[x])
					{
						ok=false;
						break;
					}
				}
				if(ok)
				{
					printf("%lld\n",a0);
					sort(a,a+n);
					flag=false;
					for(x=0;x<n;x++)
					{
						if(x==0)
							printf("%lld",a[x]);
						else
							printf(" %lld",a[x]);
					}
					printf("\n");
				}
			}
		}
	}
	return 0;
}
```