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

#define DEBUGx 1
#define NUMOFODD 250

long long b[NUMOFODD*(NUMOFODD+1)];
int long long evens[300];
int N = 4;


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)));
}
// CAUTION 2013/01/09
int comp(void * x,void * y)
{
  long long a,b;
  a = *(long long *)x;b= *(long long *)y;
  return(x-y);
}

main()
{
  int i,j,NN,even_cnt,odd_f;
  long long g,g1,odd_min;

  //printf("sz=%d:",sizeof(long long)); 
  while(EOF != scanf("%d",&N) && N )
    {
      NN = (N+1)*N/2;
      for(i=0;i<NN;i++)
	scanf("%lld ",&(b[i]));
#ifdef DEBUG
      printf("NN=%d\n",NN);
      for(i=0;i<NN;i++)
	printf(":%lld",b[i]);
#endif
      qsort(b,NN,sizeof(long long),comp);
#ifdef DEBUG   
      printf("\n-------\n",NN);
      
      for(i=0;i<NN;i++)
	printf(";%lld",b[i]);
      printf("\n");
#endif
      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;
#ifdef DEBUG
      printf("%lld %lld\n",evens[0],odd_min);
#endif
      g1 = gcd(evens[0],odd_min);
#ifdef DEBUG
      printf("e0:%lld o0:%lld g1:%lld %lld\n",evens[0],odd_min,g1,gcd(evens[0],odd_min));
#endif

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

#ifdef DEBUG
      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);
}