#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <math.h>
#include <algorithm>
using namespace std ;

long long a0 ;
long long t1[255] ;
long long t2[320000] ;

bool cmp(long long a,long long b){
	return a < b ;
}

long long gcd(long long a,long long b){
	return b?gcd(b,a%b):a;
}

int main(){
	long long n ;
	long long i , j , k ;
	long long top1 ;
	long long top2 ;
	while(scanf("%lld",&n)!=EOF){
		if(n == 0)
			break ;
		top1 = 0 ;
		top2 = 0 ;
		for(i = 0 ; i <= (n*(n+1)/2-1) ; i++){
			long long c ;
			scanf("%lld",&c) ;
			if(c%2)
				t2[top2++] = c ;
			else
				t1[top1++] = c ;
		}
		sort(t1,t1+top1,cmp) ;
		sort(t2,t2+top2,cmp) ;
		long long t = gcd(t1[0],t1[1]) ;
		long long g1 = t1[0] / t ;
		long long g2 = t1[1] / t ;
		long long q = (long long)sqrt(t2[0]/(g1*g2)*1.0) ;
		a0 = t / q ;
		printf("%lld\n",a0) ;
		for(i = 0 ; i < n ; i++){
			if(i == 0){
				printf("%lld",t1[i] / a0) ;
			}
			else
				printf(" %lld",t1[i] / a0) ;
		}
		puts("") ;
	}
	return 0 ;
}
### Prompt

Generate 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 <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#include <math.h>
#include <algorithm>
using namespace std ;

long long a0 ;
long long t1[255] ;
long long t2[320000] ;

bool cmp(long long a,long long b){
	return a < b ;
}

long long gcd(long long a,long long b){
	return b?gcd(b,a%b):a;
}

int main(){
	long long n ;
	long long i , j , k ;
	long long top1 ;
	long long top2 ;
	while(scanf("%lld",&n)!=EOF){
		if(n == 0)
			break ;
		top1 = 0 ;
		top2 = 0 ;
		for(i = 0 ; i <= (n*(n+1)/2-1) ; i++){
			long long c ;
			scanf("%lld",&c) ;
			if(c%2)
				t2[top2++] = c ;
			else
				t1[top1++] = c ;
		}
		sort(t1,t1+top1,cmp) ;
		sort(t2,t2+top2,cmp) ;
		long long t = gcd(t1[0],t1[1]) ;
		long long g1 = t1[0] / t ;
		long long g2 = t1[1] / t ;
		long long q = (long long)sqrt(t2[0]/(g1*g2)*1.0) ;
		a0 = t / q ;
		printf("%lld\n",a0) ;
		for(i = 0 ; i < n ; i++){
			if(i == 0){
				printf("%lld",t1[i] / a0) ;
			}
			else
				printf(" %lld",t1[i] / a0) ;
		}
		puts("") ;
	}
	return 0 ;
}
```