#include<bits/stdc++.h>
using namespace std;

#define int long long
#define pb push_back 
#define pf push_front 
#define mp make_pair
#define fr first
#define sc second
#define Rep(i, n) for ( int i = 0 ; i < (n); i++ )
#define All(v) v.begin(), v.end()

typedef pair<int, int> Pii; typedef pair<int, Pii> Pip;
const int INF = 1107110711071107;

int n, N;
vector<int> even_b, odd_b;

bool check(double x) {
  vector<double> a(2);
  Rep(i, 2) a[i] = (double)even_b[i] / x;
  if ( a[0]*a[1] > (double)odd_b[0] ) return false;  
  else return true;
}

bool check_last(int x) {
  vector<int> a(2);
  Rep(i, 2) {
    if ( even_b[i] % x ) return false;
    a[i] = even_b[i] / x;
  }
  if ( a[0]*a[1] == odd_b[0] ) return true;  
  else return false;
}

signed main() {  
  while ( cin >> n, n ) {
    N = n * (n+1) / 2;
    even_b.clear();
    odd_b.clear();
    
    Rep(i, N) {
      int b;
      cin >> b;
      if ( b % 2 ) odd_b.pb(b);
      else even_b.pb(b);
    }

    sort(All(even_b));
    sort(All(odd_b));
    
    double l = 1.0, r = (1 << 31)-1;
    int cnt = 100;
    while ( cnt-- ) {
      double mid = (r + l) / 2.0;      
      if ( check(mid) ) r = mid;
      else l = mid;
    }

    //cout << r << endl;
    int ans = (double)r-1;
    while ( 1 ) {
      if ( ans % 2 ) ans++;
      if ( check_last(ans) ) break;
    }
        
    cout << ans << endl;
    Rep(i, n) {
      if ( i ) cout << " ";
      cout << even_b[i] / ans;
    }
    cout << endl;
  }

  return 0;
}
### Prompt

Develop a solution in CPP 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<bits/stdc++.h>
using namespace std;

#define int long long
#define pb push_back 
#define pf push_front 
#define mp make_pair
#define fr first
#define sc second
#define Rep(i, n) for ( int i = 0 ; i < (n); i++ )
#define All(v) v.begin(), v.end()

typedef pair<int, int> Pii; typedef pair<int, Pii> Pip;
const int INF = 1107110711071107;

int n, N;
vector<int> even_b, odd_b;

bool check(double x) {
  vector<double> a(2);
  Rep(i, 2) a[i] = (double)even_b[i] / x;
  if ( a[0]*a[1] > (double)odd_b[0] ) return false;  
  else return true;
}

bool check_last(int x) {
  vector<int> a(2);
  Rep(i, 2) {
    if ( even_b[i] % x ) return false;
    a[i] = even_b[i] / x;
  }
  if ( a[0]*a[1] == odd_b[0] ) return true;  
  else return false;
}

signed main() {  
  while ( cin >> n, n ) {
    N = n * (n+1) / 2;
    even_b.clear();
    odd_b.clear();
    
    Rep(i, N) {
      int b;
      cin >> b;
      if ( b % 2 ) odd_b.pb(b);
      else even_b.pb(b);
    }

    sort(All(even_b));
    sort(All(odd_b));
    
    double l = 1.0, r = (1 << 31)-1;
    int cnt = 100;
    while ( cnt-- ) {
      double mid = (r + l) / 2.0;      
      if ( check(mid) ) r = mid;
      else l = mid;
    }

    //cout << r << endl;
    int ans = (double)r-1;
    while ( 1 ) {
      if ( ans % 2 ) ans++;
      if ( check_last(ans) ) break;
    }
        
    cout << ans << endl;
    Rep(i, n) {
      if ( i ) cout << " ";
      cout << even_b[i] / ans;
    }
    cout << endl;
  }

  return 0;
}
```