#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

using L = __int128;

int main(){
    int n;
    while(scanf(" %d", &n),n){
        vector<vector<ll>> b(n+1, vector<ll>(n+1));
        rep(i,n+1){
            for(int j=i+1; j<n+1; ++j) scanf(" %lld", &b[i][j]);
        }

        L sq_a0 = (L)b[0][1]*b[0][2];
        sq_a0 /= b[1][2];

        ll ng=0, ok=(1LL<<31)-1;
        while(ok-ng>1){
            ll mid = (ng+ok)/2;
            if(sq_a0 <= mid*mid) ok = mid;
            else ng = mid;
        }

        ll a0 = ok;
        printf("%lld\n", a0);

        vector<ll> a;
        for(int i=1; i<=n; ++i) a.pb(b[0][i]/a0);
        sort(all(a));
        rep(i,n) printf("%lld%c", a[i], " \n"[i==n-1]);
    }
    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 <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

using L = __int128;

int main(){
    int n;
    while(scanf(" %d", &n),n){
        vector<vector<ll>> b(n+1, vector<ll>(n+1));
        rep(i,n+1){
            for(int j=i+1; j<n+1; ++j) scanf(" %lld", &b[i][j]);
        }

        L sq_a0 = (L)b[0][1]*b[0][2];
        sq_a0 /= b[1][2];

        ll ng=0, ok=(1LL<<31)-1;
        while(ok-ng>1){
            ll mid = (ng+ok)/2;
            if(sq_a0 <= mid*mid) ok = mid;
            else ng = mid;
        }

        ll a0 = ok;
        printf("%lld\n", a0);

        vector<ll> a;
        for(int i=1; i<=n; ++i) a.pb(b[0][i]/a0);
        sort(all(a));
        rep(i,n) printf("%lld%c", a[i], " \n"[i==n-1]);
    }
    return 0;
}


```