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

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

long long gcdl(long long x, long long y){
	return y == 0 ? x: gcdl(y, x%y);
}

int gcd_ml(long long * a,int n)
{
  if(n==0)return(1);
  if(n==1)return(a[0]);
  return(gcdl(a[0],gcd_ml(a+1,n-1)));
}

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");
  
}

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

main()
{
  int i,j,NN,g,even_cnt;
  
  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);

      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_ml(evens,even_cnt);

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