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

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

int gcd(int x,int y)
{ int w,r;
  int i,pr;
  
  for(i=0;i<10;i++)
    {
      pr=prime[i];
      if(x % pr == 0 && y % pr == 0)
	return(pr*gcd(x/pr,y/pr));
    }
  
  if(x < y)
    {
      w = x;
      x = y;
      y=  w;
    }
  if((r = x % y) ==0)
    return(y);
  return(gcd (y, r));
}

int gcd_m(int * a,int n)
{
  //printf("GCD:%d %d %d\n",a[0],a[1],n);
  if(n==0)return(1);
  if(n==1)return(a[0]);
  return(gcd(a[0],gcd_m(a+1,n-1)));
}
int comp(void * x,void * 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("%d ",b[i]);
  printf("\n");
  
}

main()
{
  int i,j,NN,g,even_cnt,g_all;
  
  while(EOF != scanf("%d",&N) && N )
    {
      NN = N*(N+1)/2;
      for(i=0;i<NN;i++)
	scanf("%lld ",&(b[i]));
 
      //  printf("NN=%d\n",NN);
      g_all = gcd_m(b,NN);
      //printf("GA=%d\n",g_all);

      for(i=0;i<NN;i++)
	evens[i] /= g_all;

      for(i=0,j=0;i<NN;i++)
	if((b[i] % 2)==0) 
	  { evens[j++]=b[i];
	  }

      even_cnt=j;
      //printf("EC=%d\n",even_cnt);
      // for(i=0;i<even_cnt;i++)
      //  printf("%d\n",evens[i]);

      g=gcd_m(evens,even_cnt);
  
      printf("%d\n",g/g_all);
  
      for(i=0;i<even_cnt;i++)
	{
	  evens[i]/=g;
	  printf("%d ",evens[i]*g_all);
	}
      printf("\n");
    }
return(0);
}