// Aizu Vol-10 1069: Squid Multiplication
// 2017.8.18 bal4u@uu

#include <stdio.h>
#include <stdlib.h>

typedef unsigned long long UULONG;
UULONG odd[255], even[255];
int ol, el;

UULONG gcd(UULONG a, UULONG b)
{
	UULONG r;
	while (b != 0) r = a % b, a = b, b = r;
	return a;
}

int cmp(UULONG *a, UULONG *b) {
	if (*a < *b) return -1;
	if (*a == *b) return 0;
	return 1;
}

int main()
{
	int n, k, i;
	UULONG g, g2, e1, e2, o1;

	while (scanf("%d", &n) && n) {
		k = n*(n + 1) / 2;
		for (ol = el = 0, i = 0; i < k; i++) {
			scanf("%llu", &g);
			if (g & 1) odd[ol++] = g;
			else       even[el++] = g;
		}
		qsort(odd, ol, sizeof(UULONG), cmp);
		qsort(even, el, sizeof(UULONG), cmp);
		e1 = even[0], e2 = even[1], o1 = odd[0];
		g = gcd(e1, e2);
		g2 = gcd(g, o1); g /= g2, o1 /= g2;
		g2 = gcd(g, o1); g /= g2, o1 /= g2;
		printf("%llu\n%llu", g, even[0]/g);
		for (i = 1; i < n; i++) printf(" %llu", even[i]/g);
		putchar('\n');
	}
	return 0;
}