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

int cmp (void const *a,const void *b)
{
	return (long long *)a-(long long *)b;
}

long long  gcd(long long a,long long b)
{
	if (b%a==0) return a;
	else return gcd(b%a,a);
}

int main(void)
{
	long long a[300],b[300],g1,g2,k,p,l,r,num;
	int n,i,j;
	
	while(scanf("%d",&n)==1&&n)
	{
		j=0;r=0;
		for (i=0;i<n*(n+1)/2;i++)
		{
			scanf("%lld",&num);
			if (num%2==0) 
			{
				a[j++]=num;
			}
			else 
			{
				b[r++]=num;
			}
			
		}
		qsort(a,j,sizeof (a[0]),cmp);
			g1=a[0];
			for (i=0;i<j;i++)
			{
				g1=gcd(g1,a[i]);
			}
			g2=b[0];
			for (i=0;i<r;i++)
			{
				g2=gcd(g2,b[i]);
			}
				g1/=gcd(g1,g2);
					printf("%lld\n",g1);
					for (i=0;i<j;i++)
					{
						if (i!=0) printf(" ");
						printf("%lld",a[i]/g1);
					}
					printf("\n");

	}
	return 0;
}
// 30 42 315