#define _USE_MATH_DEFINES #include using namespace std; //template #define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define ALL(v) (v).begin(),(v).end() using ll=long long int; const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12; templateinline bool chmax(T& a,T b){if(ainline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;} //end const int L=101010; ll a[L]; map ds[L]; int main(){ rep(x,1,L)a[x]=1LL*x*x+1; rep(x,1,L)if(a[x]!=1){ ll p=a[x]; for(ll y=x;y>q; while(q--){ int x; cin>>x; vector res; for(auto& [p,c]:ds[x]){ rep(_,0,c)res.push_back(p); } rep(i,0,res.size())cout<