This documentation is automatically generated by online-judge-tools/verification-helper
#define PROBLEM "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1069"
#include <bits/stdc++.h>
using namespace std;
#define call_from_test
#include "../../tools/int128.cpp"
#undef call_from_test
#ifdef SANITIZE
#define IGNORE
#endif
using ll = __int128_t;
ll sqrt(ll x){
assert(x>=0);
if(x<=1) return x;
ll l=0,r=x;
while(l+1<r){
ll m=(l+r)>>1;
if(m<=x/m&&m*m<=x) l=m;
else r=m;
}
return l;
}
signed main(){
cin.tie(0);
ios::sync_with_stdio(0);
int n;
while(cin>>n,n){
int m=n*(n+1)/2;
vector<ll> bs(m),es,os;
for(int i=0;i<m;i++) cin>>bs[i];
for(ll b:bs)
((b&1)?os:es).emplace_back(b);
sort(es.begin(),es.end());
sort(os.begin(),os.end());
ll a=sqrt(es[0]*es[1]/os[0]);
cout<<a<<endl;
for(int i=0;i<n;i++){
if(i) cout<<" ";
cout<<es[i]/a;
}
cout<<endl;
}
return 0;
}
#line 1 "test/aoj/1069.test.cpp"
#define PROBLEM "http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1069"
#include <bits/stdc++.h>
using namespace std;
#define call_from_test
#line 1 "tools/int128.cpp"
#line 3 "tools/int128.cpp"
using namespace std;
/*
multiprecision:
#include <boost/multiprecision/cpp_int.hpp>
using ll = boost::multiprecision::cpp_int;
*/
#endif
//BEGIN CUT HERE
__int128_t abs128(__int128_t val){return val<0?-val:val;}
ostream &operator<<(ostream &os,__int128_t val){
if(ostream::sentry(os)){
__uint128_t tmp=abs128(val);
char buf[64];
char *d=end(buf);
do{
--d;
*d=char(tmp%10+'0');
tmp/=10;
}while(tmp);
if(val<0) *--d='-';
int len=end(buf)-d;
if(os.rdbuf()->sputn(d,len)!=len){
os.setstate(ios_base::badbit);
}
}
return os;
}
istream &operator>>(istream &is,__int128_t &val){
string s;
is>>s;
val=0;
for(int i=0;i<(int)s.size();i++)
if(isdigit(s[i])) val=val*10+s[i]-'0';
if(s[0]=='-') val*=-1;
return is;
}
//END CUT HERE
#ifndef call_from_test
//INSERT ABOVE HERE
signed main(){
return 0;
}
#endif
#line 8 "test/aoj/1069.test.cpp"
#undef call_from_test
#ifdef SANITIZE
#define IGNORE
#endif
using ll = __int128_t;
ll sqrt(ll x){
assert(x>=0);
if(x<=1) return x;
ll l=0,r=x;
while(l+1<r){
ll m=(l+r)>>1;
if(m<=x/m&&m*m<=x) l=m;
else r=m;
}
return l;
}
signed main(){
cin.tie(0);
ios::sync_with_stdio(0);
int n;
while(cin>>n,n){
int m=n*(n+1)/2;
vector<ll> bs(m),es,os;
for(int i=0;i<m;i++) cin>>bs[i];
for(ll b:bs)
((b&1)?os:es).emplace_back(b);
sort(es.begin(),es.end());
sort(os.begin(),os.end());
ll a=sqrt(es[0]*es[1]/os[0]);
cout<<a<<endl;
for(int i=0;i<n;i++){
if(i) cout<<" ";
cout<<es[i]/a;
}
cout<<endl;
}
return 0;
}