/*
AizuOnline A1069
Squid Multiplication
*/
#include <stdio.h>
#include <math.h>
#include <float.h>

#define DEBUG 1
#define NUMOFODD 250

long long b[NUMOFODD*(NUMOFODD+1)];
int long long evens[300];
int N = 4;
int prime[10]={2,3,5,7,11,13,17,19,23,29};

long long gcd(long long x, long long y){
	return y == 0 ? x: gcd(y, x%y);
}
long long gcd_ml(long long * a,long long n)
{
  if(n==0)return(1);
  if(n==1)return(a[0]);
  return(gcd(a[0],gcd_ml(a+1,n-1)));
}
int comp(long long * x,long long * y)
{
  return(*(int *)x - *(int *)y);
}
void make_test_data(int a[],int n)
{
  int i,j,k;

  k=0;
  for(i=0;i<n-1;i++)
    for(j=i+1;j<n-1;j++)
      b[k++]=a[i]*a[j];
  
  for(i=0;i<k;i++)
    printf("%lld ",b[i]);
  printf("\n");
  
}

main()
{
  int i,j,NN,even_cnt,odd_min,odd_f;
  long long g,g1;
  
  while(EOF != scanf("%d",&N) && N )
    {
      NN = N*(N+1)/2;
      for(i=0;i<NN;i++)
	scanf("%lld ",&(b[i]));
 
      qsort(b,NN,sizeof(long long),comp);
   
      j=0;odd_f=0;
      for(i=0;i<NN;i++)
	if((b[i] % 2)==0) 
	  { evens[j++]=b[i];
	  }
        else
	  {
	    if(odd_f == 0)
	      {
		odd_f = 1;
		odd_min=b[i];
	      }
	  }
      even_cnt=j;

      g1 = gcd (evens[0],odd_min);
      g = sqrt((float)evens[0]/g1*evens[1]/(odd_min/g1));

#ifdef DEBUGx
      printf("ec:%d g:%lld\n",even_cnt,g);
#endif
      printf("%lld\n",g);
      for(i=0;i<even_cnt;i++)
	{
	  evens[i]/=g;
	  printf("%lld ",evens[i]);
	}
      printf("\n");
    }
return(0);
}