#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <map>
#include <string>
#include <string.h>

using namespace std;
#define maxn  255

long long a[maxn * maxn];
long long b[maxn * maxn];
long long c[maxn * maxn];

int main() {
	int n;
	while(~scanf("%d",&n),n) {
		int m = n * (n + 1) / 2;
		int t1 = 0;
		int t2 = 0;
		for(int i = 0; i < m; i ++) {
			scanf("%lld", &a[i]);
			if(a[i] % 2 == 1)
				b[t1++] = a[i];
			else
				c[t2++] = a[i];
		}
		sort(b, b + t1);
		sort(c, c + t2);
		double x = (c[0] * 1.0) / b[0] * c[1];
		long long ans = (long long)(sqrt(x) + 0.001); 
		printf("%lld\n",ans);
		for(int i = 0; i < n; i ++) {
			if (i == n - 1)
				printf("%lld\n",c[i] / ans);
			else 
				printf("%lld ",c[i] / ans);
		}
	}
	return 0;
}