/*
  AOJ 1069
  Title:Squid Multiplication
  @kankichi573
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define max(x,y) (((x)>(y))?(x):(y))
#define min(x,y) (((x)<(y))?(x):(y))

int n,b[31375],ans[250];

long long gcd(long long a, long long b)
{
        int c;
        while (b > 0) {
                c = a % b;
                a = b;
                b = c;
        }
        return a;
}

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


main()
{
  int n,i,j;
  long long x,even;
  
  while(scanf("%d",&n) && n)
    {
      even=0;
      for(i=0;i<n*(n+1)/2;i++)
	{
	  scanf("%lld",&x);
	  b[i]=x;
	  if((x % 2)==0)
	    {
	      if(even==0)
		even = x;
	      else
		even = gcd(x,even);
	    }
	}

      for(i=j=0;i<n*(n+1)/2;i++)
	if((b[i] % 2)==0)
	    ans[j++]=b[i]/even;

      qsort(ans,n,sizeof(int),compare);
      printf("%lld\n",even);
      for(i=0;i<n;i++)
	{
	  if(i)
	    printf(" ");
	  printf("%d",ans[i]);
	}
      printf("\n");
    }
  return(0);
}