#include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <sstream>

using namespace std;

#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) (EQ((a).real(),(b).real()) && EQ((a).imag(),(b).imag()))

typedef complex<double> P;
typedef long long ll;

const int MAX_SIZE = 10000;

int main(){

	int n;
	while(cin >> n && n != 0){
		ll *b = new ll[41126];
		fill(b,b+41126,0);

		ll *prv = new ll[41126];
		ll *nxt = new ll[41126];
		int p ,nx;
		p = nx = 0;
		for(int i = 0; i < (n*(n+1))/2; i++){
			ll tmp;
			cin >> tmp;
			if(tmp % 2 == 0){
				prv[p++] = tmp;
			}
			else{
				nxt[nx++] = tmp;
			}
		}
		sort(prv,prv+p);
		sort(nxt,nxt+nx);

		int idx = 0;
		for(int i = 0; i < p; i++){
			b[idx++] = prv[i];
		}
		for(int i = 0; i < nx; i++){
			b[idx++] = nxt[i];
		}

		double aa = (b[0]*b[1])/b[n];
		aa = sqrt(aa);
		vector<int> nums;
		int vvv = (int)(aa+0.1);
		for(int i = 0; i < p; i++){
			nums.push_back(b[i]/vvv);
		}

		cout << vvv << endl;
		sort(nums.begin(),nums.end());
		for(int i  = 0; i < nums.size(); i++){
			cout << nums[i];
			if(nums.size() - 1 == i)
				cout << endl;
			else
				cout << " ";
		}
		delete [] prv;
		delete [] nxt;
		delete [] b;
	}

	return 0;
}