#pragma GCC optimize(2)
#include<bits/stdc++.h>
using namespace std;

#define endl "\n"
#define ll long long
#define mem(a,num) memset(a,num,sizeof(a))
const int maxn = 1e3+5;

ll t,m,n,temp,ans,maxum;
ll num[maxn][maxn];
ll mark[maxn];
string str;
map<char,int> mp;

int main() {
//	ios::sync_with_stdio(false);
//	cin.tie(0);
//	cout<<__gcd(99990000,99970002);
	cin>>n;
	for(int i = 1; i <= n; i++) {
		for(int j = 1; j<=n; j++) {
			cin>>num[i][j];
		}
	}
	temp = __gcd(num[1][2],num[2][3]);
	mark[1] = num[1][2] / temp;
	cout<<mark[1]<<" ";
	for(int i = 2; i<=n; i++) {
		mark[i] = num[i][i-1]/mark[i-1];
		mark[1] = max(mark[1],num[1][i]/mark[i]);
	}
	for(int i = 2; i<=n; i++) {
		cout<<mark[i]<<" ";
	}
	puts("");
}


#pragma GCC optimize(2)
#include<bits/stdc++.h>
using namespace std;

#define endl "\n"
#define ll long long
#define mem(a,num) memset(a,num,sizeof(a))
const int maxn = 1e3+5;

ll t,m,n,temp,ans,maxum;
ll num[maxn][maxn];
ll mark[maxn];
string str;
map<char,int> mp;

int main() {
//	ios::sync_with_stdio(false);
//	cin.tie(0);
//	cout<<__gcd(99990000,99970002);
	cin>>n;
	for(int i = 1; i <= n; i++) {
		for(int j = 1; j<=n; j++) {
			cin>>num[i][j];
		}
		mark[i] = num[i][1];
	}
	for(int i = 1; i <= n; i++) {
		for(int j = 2; j<=n; j++) {
			if(num[i][j]==0){
				continue;
			}
			mark[i] = __gcd(mark[i],num[i][j]);
		}
	}

//	for(int i = 1; i <= n; i++) {
//		for(int j = 2; j<=n; j++) {
//			mark[i] = min(mark[i],num[i][j]/mark[i]);
//		}
//	}puts("!!");
	for(int i = 2;i<=n;i++){
		mark[1] = min(mark[1],num[1][i]/mark[i]);
	}
	for(int i = 1;i<=n;i++){
		cout<<mark[i]<<" ";
	}
	puts("");
}


#include<bits/stdc++.h>
#define ll long long
#define pp pair<int,int>
#define F first
#define S second
#define N 1005

using namespace std;

int num[N];

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

   int n;
   cin>>n;
   ll a[n][n];
   for(int i=0; i<n; i++)for(int j=0; j<n; j++){
        cin>>a[i][j];
        if(i==j && a[i][j])num[i]=sqrt(a[i][j]);
   }

   for(int i=0; i<n; i++){
    if(num[i]){
        for(int j=0; j<n; j++){
            if(i==j || !a[i][j] || num[j])continue;
            num[j]=a[i][j]/num[i];
        }
        continue;
    }
    for(int j=0; j<n; j++){
        if(a[i][j]){
            for(int k=0; k<n; k++){
                if(k==i || k==j || !a[i][k] || !a[j][k])continue;
               ll x =sqrt(a[i][j]*a[i][k]/a[j][k]);
               //cout<<a[i][j]<<endl;
               //cout<<i<<" "<<j<<" "<<k<<" "<<x<<endl;
                num[i]=x;
                //num[j]=a[i][j]/num[i];
                //num[k]=a[i][k]/num[i];
                break;
            }
       if(num[i]){
        for(int j=0; j<n; j++){
            if(i==j || !a[i][j]|| !num[i])continue;
            num[j]=a[i][j]/num[i];
        }
        continue;
    }
    }
    }
   }
   for(int i=0; i<n; i++)cout<<num[i]<<" ";
   cout<<endl;

}


#include<bits/stdc++.h>
#define ll long long
#define pp pair<int,int>
#define F first
#define S second
#define N 1000005

using namespace std;

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    //cout.precision(6);

    int n;
    cin>>n;
    ll a[n][n], x, gcd;
    //vector<ll>v;
    ll v[n], k[n], l[n];
    memset(v, -1, sizeof v);
    for(int i=0; i<n; i++){
        gcd = -1;
        bool f = false;
        for(int j=0; j<n; j++){
            cin>>a[i][j];
            if(i==j && a[i][j]){
                v[i] = sqrt(a[i][j]);
                k[i]=v[i];
                f = true;
            }

        }
        if(f){
             for(int j=0; j<n; j++)if(a[i][j] && j!=i && v[j]==-1)k[j]=v[j]=a[i][j]/v[i];
        }
        else if(v[i]==-1){
            for(int j=0; j<n; j++){

            if(a[i][j] && gcd>0)gcd = __gcd(gcd,a[i][j]);
            else if(a[i][j])gcd = a[i][j];
            //cout<<i+1<<" "<<gcd<<endl;

           }
            v[i]=gcd;
            //for(int j=0; j<n; j++)if(a[i][j] && j!=i && v[j]==-1)v[j]=a[i][j]/v[i];
        }

       //cout<<v[i]<<endl;

    }
    for(int i=0; i<n; i++){
        if(v[i]==-1){
            gcd = -1;
            for(int j=0; j<n; j++){
                   // cout<<v[j]<<"UYGUJH"<<endl;
                if(gcd==-1 && v[j] && a[j][i] && i!=j)gcd = a[j][i]/v[j];
                else if( v[j] && a[j][i])gcd = __gcd(gcd,a[j][i]/v[j]);
                else if(a[j][i] && gcd>0)gcd = __gcd(gcd,a[j][i]);
                else if(a[j][i])gcd = a[j][i];

                //cout<<gcd<<endl;
            }
            //cout<<i<<" "<<gcd<<endl;
           v[i] =gcd;
        }

    }
   for(int i=0; i<n; i++){
            bool f = true;
            int c =0;
        for(int j=0; j<n; j++){
            if(a[i][j] && a[i][j]/v[i]!=v[j]){
                f = false;
                c++;
                cout<<a[i][j]<<" "<<v[i]<<endl;
                //break;
            }
        }
        if(!f && c>n/2){
            int k = v[i];
            for(int j=0; j<n; j++){
            if(v[j] && a[i][j])v[i] = __gcd(v[i],a[i][j]/v[j]);
            else if(v[j] && a[j][i])v[i] = __gcd(v[i],a[j][i]/v[j]);
          }

        }
        //cout<<v[i]<<endl;

    }

    for(int i=0; i<n; i++){
        /*if(v[i]==-1){
            gcd = -1;
            for(int j=0; j<n; j++){

            }

            v[i] = gcd;
        }*/
        cout<<v[i]<<" ";
    }
    cout<<endl;
}


#include<bits/stdc++.h>
#define ll long long
#define pp pair<int,int>
#define F first
#define S second
#define N 1000005

using namespace std;

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    //cout.precision(6);

    int n;
    cin>>n;
    ll a[n][n], x, gcd;
    vector<ll>v;
    for(int i=0; i<n; i++){
        gcd = -1;
        for(int j=0; j<n; j++){
            cin>>x;
            if(x && gcd>0)gcd = __gcd(gcd,x);
            else if(x)gcd = x;
            a[i][j] = x;
        }
        v.push_back(gcd);
    }
    for(int i=0; i<n; i++){
        if(v[i]==-1){
            gcd = -1;
            for(int j=0; j<n; j++){
                if(a[j][i] && gcd>0)gcd = __gcd(gcd,a[j][i]);
                else if(a[j][i])gcd = a[j][i];
            }

            v[i] = gcd;
        }
        cout<<v[i]<<" ";
    }
    cout<<endl;
}


#include<bits/stdc++.h>
#define ll long long
#define pp pair<int,int>
#define F first
#define S second
#define N 1000005

using namespace std;

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    //cout.precision(6);

    int n;
    cin>>n;
    ll a[n][n], x, gcd;
    //vector<ll>v;
    ll v[n], k[n], l[n];
    memset(v, -1, sizeof v);
    for(int i=0; i<n; i++){
        gcd = -1;
        bool f = false;
        for(int j=0; j<n; j++){
            cin>>a[i][j];
            if(i==j && a[i][j]){
                v[i] = sqrt(a[i][j]);
                k[i]=v[i];
                f = true;
            }

        }
        if(f){
             for(int j=0; j<n; j++)if(a[i][j] && j!=i && v[j]==-1)k[j]=v[j]=a[i][j]/v[i];
        }
        else if(v[i]==-1){
            for(int j=0; j<n; j++){

            if(a[i][j] && gcd>0)gcd = __gcd(gcd,a[i][j]);
            else if(a[i][j])gcd = a[i][j];
            //cout<<i+1<<" "<<gcd<<endl;

           }
            v[i]=gcd;
            //for(int j=0; j<n; j++)if(a[i][j] && j!=i && v[j]==-1)v[j]=a[i][j]/v[i];
        }

       //cout<<v[i]<<endl;

    }
    for(int i=0; i<n; i++){
        if(v[i]==-1){
            gcd = -1;
            for(int j=0; j<n; j++){
                   // cout<<v[j]<<"UYGUJH"<<endl;
                if(gcd==-1 && v[j] && a[j][i] && i!=j)gcd = a[j][i]/v[j];
                else if( v[j] && a[j][i])gcd = __gcd(gcd,a[j][i]/v[j]);
                else if(a[j][i] && gcd>0)gcd = __gcd(gcd,a[j][i]);
                else if(a[j][i])gcd = a[j][i];

                //cout<<gcd<<endl;
            }
            //cout<<i<<" "<<gcd<<endl;
           v[i] =gcd;
        }

    }
   for(int i=0; i<n; i++){
            bool f = true;
            int c =0;
        for(int j=0; j<n; j++){
            if(a[i][j] && a[i][j]/v[i]!=v[j]){
                f = false;
                c++;
                //cout<<a[i][j]<<" "<<v[i]<<endl;
                //break;
            }
        }
        if(!f && c>n/2){
            int k = v[i];
            for(int j=0; j<n; j++){
            if(v[j] && a[i][j])v[i] = __gcd(v[i],a[i][j]/v[j]);
            else if(v[j] && a[j][i])v[i] = __gcd(v[i],a[j][i]/v[j]);
          }

        }
        //cout<<v[i]<<endl;

    }

    for(int i=0; i<n; i++){
        /*if(v[i]==-1){
            gcd = -1;
            for(int j=0; j<n; j++){

            }

            v[i] = gcd;
        }*/
        cout<<v[i]<<" ";
    }
    cout<<endl;
}


#include<bits/stdc++.h>
#define ll long long
#define pp pair<int,int>
#define F first
#define S second
#define N 1000005

using namespace std;

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    //cout.precision(6);

    int n;
    cin>>n;
    ll a[n][n], x, gcd;
    //vector<ll>v;
    ll v[n], k[n], l[n];
    memset(v, -1, sizeof v);
    for(int i=0; i<n; i++){
        gcd = -1;
        bool f = false;
        for(int j=0; j<n; j++){
            cin>>a[i][j];
            if(i==j && a[i][j]){
                v[i] = sqrt(a[i][j]);
                k[i]=v[i];
                f = true;
            }

        }
        if(f){
             for(int j=0; j<n; j++)if(a[i][j] && j!=i && v[j]==-1)k[j]=v[j]=a[i][j]/v[i];
        }
        else if(v[i]==-1){
            for(int j=0; j<n; j++){

            if(a[i][j] && gcd>0)gcd = __gcd(gcd,a[i][j]);
            else if(a[i][j])gcd = a[i][j];
            //cout<<i+1<<" "<<gcd<<endl;

           }
            k[i]=gcd;
            //for(int j=0; j<n; j++)if(a[i][j] && j!=i && v[j]==-1)v[j]=a[i][j]/v[i];
        }
       //cout<<k[i]<<endl;

    }
    for(int i=0; i<n; i++){
        if(v[i]==-1){
            gcd = -1;
            for(int j=0; j<n; j++){
                if(a[j][i] && gcd>0)gcd = __gcd(gcd,a[j][i]);
               else if(a[j][i])gcd = a[j][i];
            }
           v[i] = __gcd(gcd,k[i]);
        }

    }
   for(int i=0; i<n; i++){
            bool f = true;
        for(int j=0; j<n; j++){
            if(a[i][j] && a[i][j]/v[i]!=v[j]){
                f = false;
                break;
            }
        }
        if(!f){
            int k = v[i];
          for(int j=0; j<n; j++){
            if(v[j] && a[i][j])v[i] = __gcd(v[i],a[i][j]/v[j]);
            if(v[j] && a[j][i])v[i] = __gcd(v[i],a[i][j]/v[j]);
          }

        }
    }

    for(int i=0; i<n; i++){
        /*if(v[i]==-1){
            gcd = -1;
            for(int j=0; j<n; j++){

            }

            v[i] = gcd;
        }*/
        cout<<v[i]<<" ";
    }
    cout<<endl;
}


#include<bits/stdc++.h>
#define ll long long
#define pp pair<int,int>
#define F first
#define S second
#define N 1000005

using namespace std;

int main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    //cout.precision(6);

    int n;
    cin>>n;
    ll a[n][n], x, gcd;
    //vector<ll>v;
    ll v[n];
    memset(v, -1, sizeof v);
    for(int i=0; i<n; i++){
        gcd = -1;

        for(int j=0; j<n; j++){
            cin>>a[i][j];

        }
        if(v[i]==-1){
            for(int j=0; j<n; j++){

            if(a[i][j] && gcd>0)gcd = __gcd(gcd,a[i][j]);
            else if(a[i][j])gcd = a[i][j];
            //cout<<i+1<<" "<<gcd<<endl;

        }
            v[i]=gcd;
            for(int j=0; j<n; j++)if(a[i][j] && j!=i && v[j]==-1)v[j]=a[i][j]/v[i];
        }

    }

    for(int i=0; i<n; i++){
        /*if(v[i]==-1){
            gcd = -1;
            for(int j=0; j<n; j++){
                if(a[j][i] && gcd>0)gcd = __gcd(gcd,a[j][i]);
                else if(a[j][i])gcd = a[j][i];
            }

            v[i] = gcd;
        }*/
        cout<<v[i]<<" ";
    }
    cout<<endl;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

int gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}

// Function to find gcd of array of
// numbers
int findGCD(long long arr[], long long n)
{
    int result = arr[0];
    for (int i = 1; i < n; i++)
    {
        result = gcd(arr[i], result);

        if(result == 1)
        {
           return 1;
        }
    }
    return result;
}

int main ()
{
	int n;
	cin >> n;
	long long  a[n][n] , b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
	}

	long long z = (n)/2;
	b[z] = findGCD(a[z],n);
	for(int i=0;i<n;i++){
		if(i==z){
			cout << b[z] << " ";
		}
		else{
		b[i]= a[z][i]/b[z];
		cout << b[i] << " ";}
	}
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

int gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}

// Function to find gcd of array of
// numbers
int findGCD(long long arr[], long long n)
{
    int result = arr[0];
    for (int i = 1; i < n; i++)
    {
        result = gcd(arr[i], result);

        if(result == 1)
        {
           return 1;
        }
    }
    return result;
}

int main ()
{
	int n;
	cin >> n;
	long long  a[n][n] , b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
		b[i] = findGCD(a[i],n);
	}
	for(int i=0;i<n;i++){
		cout << b[i] << " ";
	}
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

int main ()
{
	int n;
	cin >> n;
	long long a[n][n] ;
	long long b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
	}

	b[0] = sqrtl((a[0][1]*a[0][2])/a[1][2]);
	cout << b[0] << " ";
	for(int i=1;i<n;i++){
		b[i] = a[0][i]/b[0];
		cout << b[i] << " ";
	}
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

int main ()
{
	int n;
	cin >> n;
	long a[n][n] , b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
	}

	b[0] = sqrt(a[1][2]*a[1][3]/a[2][3]);
	cout << b[0] << " ";
	for(int i=1;i<n;i++){
		b[i] = a[0][i]/b[0];
		cout << b[i] << " ";
	}
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

int main ()
{
	int n;
	cin >> n;
	long long a[n][n] , b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
	}

	b[0] = sqrtl(a[1][2]*a[1][3]/a[2][3]);
	cout << b[0] << " ";
	for(int i=1;i<n;i++){
		b[i] = a[0][i]/b[0];
		cout << b[i] << " ";
	}
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

int gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}

// Function to find gcd of array of
// numbers
int findGCD(long long arr[], long long n)
{
    int result = arr[0];
    for (int i = 1; i < n; i++)
    {
        result = gcd(arr[i], result);

        if(result == 1)
        {
           return 1;
        }
    }
    return result;
}

int main ()
{
	int n;
	cin >> n;
	long long  a[n][n] , b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
	}
	int z = (n+1)/2;
	b[z] = findGCD(a[z],n);
	for(int i=0;i<n;i++){
		if(i==z){
			cout << b[z] << " ";
		}
		else{
		b[i]= a[z][i]/b[z];
		cout << b[i] << " ";}
	}
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

int gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}

// Function to find gcd of array of
// numbers
int findGCD(long long arr[], long long n)
{
    int result = arr[0];
    for (int i = 1; i < n; i++)
    {
        result = gcd(arr[i], result);

        if(result == 1)
        {
           return 1;
        }
    }
    return result;
}

int main ()
{
	int n;
	cin >> n;
	long long  a[n][n] , b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
	}
	b[0] = findGCD(a[0],n);
	cout << b[0] << " ";
	for(int i=1;i<n;i++){
		b[i]= a[0][i]/b[0];
		cout << b[i] << " ";
	}
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

long long gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}

// Function to find gcd of array of
// numbers
long long findGCD(long long arr[], long long n)
{
    int result = arr[0];
    for (int i = 1; i < n; i++)
    {
        result = gcd(arr[i], result);

        if(result == 1)
        {
           return 1;
        }
    }
    return result;
}

int main ()
{
	int n;
	cin >> n;
	long long  a[n][n] , b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
	}

	long long z = (n+1)/2;
	b[z] = findGCD(a[z],n);
	for(int i=0;i<n;i++){
		if(i==z){
			cout << b[z] << " ";
		}
		else{
		b[i]= a[z][i]/b[z];
		cout << b[i] << " ";}
	}
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

int main ()
{
	int n;
	cin >> n;
	long long a[n][n] , b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
	}

	b[0] = sqrt(a[1][2]*a[1][3]/a[2][3]);
	cout << b[0] << " ";
	for(int i=1;i<n;i++){
		b[i] = a[0][i]/b[0];
		cout << b[i] << " ";
	}
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

int gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}

// Function to find gcd of array of
// numbers
int findGCD(long long arr[], long long n)
{
    int result = arr[0];
    for (int i = 1; i < n; i++)
    {
        result = gcd(arr[i], result);

        if(result == 1)
        {
           return 1;
        }
    }
    return result;
}

int main ()
{
	int n;
	cin >> n;
	long long  a[n][n] , b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
	}
	long long z = (n+1)/2;
	b[z] = findGCD(a[z],n);
	for(int i=0;i<n;i++){
		if(i==z){
			cout << b[z] << " ";
		}
		else{
		b[i]= a[z][i]/b[z];
		cout << b[i] << " ";}
	}
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

int main ()
{
	int n;
	cin >> n;
	long long  a[n][n] , b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
	}

	b[0] = sqrt(a[1][2]*a[1][3]/a[2][3]);
	cout << b[0] << " ";
	for(int i=1;i<n;i++){
		b[i] = a[0][i]/b[0];
		cout << b[i] << " ";
	}
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
#include<vector>
#include<cstdlib>
using namespace std;

int gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}

// Function to find gcd of array of
// numbers
int findGCD(long long arr[], long long n)
{
    int result = arr[0];
    for (int i = 1; i < n; i++)
    {
        result = gcd(arr[i], result);

        if(result == 1)
        {
           return 1;
        }
    }
    return result;
}

int main ()
{
	int n;
	cin >> n;
	long long  a[n][n] , b[n];
	for(int i=0; i<n;i++){
		for(int j=0;j<n;j++){
			cin >> a[i][j];
		}
	}
	long long z = (n-1)/2;
	b[z] = findGCD(a[z],n);
	for(int i=0;i<n;i++){
		if(i==z){
			cout << b[z] << " ";
		}
		else{
		b[i]= a[z][i]/b[z];
		cout << b[i] << " ";}
	}
    return 0;
}


#include<iostream>
#include<algorithm>
#define ll long long
using namespace std;

int main()
{
  ll n;
  cin>>n;

  ll m[1000][1000],a[n];

  for(ll i = 0; i < n;i++)
  {
    for(ll j = 0;j < n;j++)
        cin>>m[i][j];
  }

   for(ll i = 0;i < n; i++)
   {
     ll gc;
     for(ll j = 0;j < n-1;j++)
     {
       gc = __gcd(m[i][j],m[i][j+1]);
     }
     a[i] = gc;
   }

   for(ll i = 0;i < n; i++)
      cout<<a[i]<<" ";
}


#include<iostream>
#include<algorithm>
#include<cmath>
#define ll long long
using namespace std;

int main()
{
  ll n;
  cin>>n;

  ll m[1000][1000],a[n],a1[n];

  for(ll i = 0; i < n;i++)
  {
    for(ll j = 0;j < n;j++)
        cin>>m[i][j];
  }

   for(ll i = 0;i < n; i++)
   {
       ll gc;
       if(i == 0)
          gc = m[i][1];
        else
          gc = m[i][0];

     for(ll j = 1;j < n;j++)
     {
       ll gcd = __gcd(m[i][j],gc);

         if(gcd < gc)
           gc = gcd;
     }
     a[i] = gc;
   }

ll cnt = 0;
ll flag = 0,flag1 = 0;

    for(ll i = 0;i < n; i++)
    {
        cnt = 0,flag = 0,flag1 = 0;
        for(ll j = 0;j < n; j++)
        {
            if(a[i]*a[j] != m[i][j] && i != j)
                cnt++;
        }

        if(cnt > 1)
          flag = 1;

        if(cnt > 1 && i != 1)
           a[i] = m[i][1]/a[1];
         else if(cnt >1 && i == 1)
           a[i] = m[i][0]/a[0];
         else if(cnt > 0)
            {
                flag1 = 1;
                ll z = sqrt(m[0][1]);
                for(ll i = 0;i<n;i++)
                {
                    a1[i] = z;
                }
            }
    }

 if(flag1 == 1){
   for(ll i = 0;i < n; i++)
      cout<<a1[i]<<" ";}
      else{
   for(ll i = 0;i < n; i++)
      cout<<a[i]<<" ";
}}


#include<iostream>
#include<algorithm>
#define ll long long
using namespace std;

int main()
{
  ll n;
  cin>>n;

  ll m[1000][1000],a[n];

  for(ll i = 0; i < n;i++)
  {
    for(ll j = 0;j < n;j++)
        cin>>m[i][j];
  }

   for(ll i = 0;i < n; i++)
   {
       ll gc;
       if(i == 0)
          gc = m[i][1];
        else
          gc = m[i][0];

     for(ll j = 1;j < n;j++)
     {
       ll gcd = __gcd(m[i][j],gc);

         if(gcd < gc)
           gc = gcd;
     }
     a[i] = gc;
   }

ll cnt = 0;

    for(ll i = 0;i < n; i++)
    {
        cnt = 0;
        for(ll j = 0;j < n; j++)
        {
            if(a[i]*a[j] != m[i][j] && i != j)
                cnt++;
        }
        if(cnt > 1 && i != 1)
           a[i] = m[i][1]/a[1];
         else if(cnt >1 && i == 1)
           a[i] = m[i][0]/a[0];

    }

   for(ll i = 0;i < n; i++)
      cout<<a[i]<<" ";
}


#include<iostream>
#include<algorithm>
#define ll long long
using namespace std;

int main()
{
  ll n;
  cin>>n;

  ll m[1000][1000],a[n];

  for(ll i = 0; i < n;i++)
  {
    for(ll j = 0;j < n;j++)
        cin>>m[i][j];
  }

   for(ll i = 0;i < n; i++)
   {
     ll gc = 1e9;
     for(ll j = 0;j < n-1;j++)
     {
       ll gcd = __gcd(m[i][j],m[i][j+1]);

         if(gcd < gc)
           gc = gcd;
     }
     a[i] = gc;
   }

   for(ll i = 0;i < n; i++)
      cout<<a[i]<<" ";
}


#include<iostream>
#include<algorithm>
#include<cmath>
#define ll long long
using namespace std;

int main()
{
  ll n;
  cin>>n;

  ll m[1000][1000],a[n],a1[n];

  for(ll i = 0; i < n;i++)
  {
    for(ll j = 0;j < n;j++)
        cin>>m[i][j];
  }

   for(ll i = 0;i < n; i++)
   {
       ll gc;
       if(i == 0)
          gc = m[i][1];
        else
          gc = m[i][0];

     for(ll j = 1;j < n;j++)
     {
       ll gcd = __gcd(m[i][j],gc);

         if(gcd < gc)
           gc = gcd;
     }
     a[i] = gc;
   }

ll cnt = 0;
ll flag = 0,flag1 = 0;

    for(ll i = 0;i < n; i++)
    {
        cnt = 0;
        for(ll j = 0;j < n; j++)
        {
            if(a[i]*a[j] != m[i][j] && i != j)
                cnt++;
        }

        if(cnt > 1)
          flag = 1;

        if(cnt > 1 && i != 1)
           a[i] = m[i][1]/a[1];
         else if(cnt >1 && i == 1)
           a[i] = m[i][0]/a[0];
         else if(cnt > 0)
            {
                flag1 = 1;
                ll z = sqrt(m[0][1]);
                for(ll i = 0;i<n;i++)
                {
                    a1[i] = z;
                }
            }
    }

 if(flag1 == 1){
   for(ll i = 0;i < n; i++)
      cout<<a1[i]<<" ";}
      else{
   for(ll i = 0;i < n; i++)
      cout<<a[i]<<" ";
}}


#include<iostream>
#include<algorithm>
#include<cmath>
#define ll long long
using namespace std;

int main()
{
  ll n;
  cin>>n;

  ll m[1000][1000],a[n];

  for(ll i = 0; i < n;i++)
  {
    for(ll j = 0;j < n;j++)
        cin>>m[i][j];
  }

   for(ll i = 0;i < n; i++)
   {
       ll gc;
       if(i == 0)
          gc = m[i][1];
        else
          gc = m[i][0];

     for(ll j = 1;j < n;j++)
     {
       ll gcd = __gcd(m[i][j],gc);

         if(gcd < gc)
           gc = gcd;
     }
     a[i] = gc;
   }

ll cnt = 0;

    for(ll i = 0;i < n; i++)
    {
        cnt = 0;
        for(ll j = 0;j < n; j++)
        {
            if(a[i]*a[j] != m[i][j] && i != j)
                cnt++;
        }
        if(cnt > 1 && i != 1)
           a[i] = m[i][1]/a[1];
         else if(cnt >1 && i == 1)
           a[i] = m[i][0]/a[0];
         else if(cnt > 0)
            {
                ll z = sqrt(m[0][1]);
                for(ll i = 0;i<n;i++)
                {
                    a[i] = z;
                }
                break;
            }
    }

   for(ll i = 0;i < n; i++)
      cout<<a[i]<<" ";
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};

 bool in[1000100];

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("out.txt", "w", stdout);
    #endif
    int n, j, i, k, c, ans;
    cin>>n;
    int a[n+1][n+1];
    int b[n+1];
    for(i=1;i<=n;i++){
        for(j=1;j<=n;j++) cin>>a[i][j];
    }
    int x=a[1][2]; int s=sqrt(x);
    vi v, print;
    for(i=1;i<=s;i++){
        if(x%i==0){
            if(i==x/i) v.pb(i);
            else{
                v.pb(i);
                v.pb(x/i);
            }
        }
    }
    for(i=0;i<v.sz;i++){
        cout<<v[i]<<endl;
        int f=0;
        for(j=1;j<=n;j++){
            if(a[1][j]%v[i]!=0 || a[j][1]%v[i]!=0){
                f=1;
                break;
            }
            else if(a[1][j]%v[i]==0 && a[j][1]%v[i]==0){
                print.pb(a[1][j]/v[i]);
            }
        }
        if(f==0){
            ans=v[i];
            break;
        }
        else print.clear();
    }
    cout<<ans<<" ";
    for(i=1;i<n;i++){
        cout<<print[i]<<" ";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};

 bool in[1000100];

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("out.txt", "w", stdout);
    #endif
    int n, j, i;
    cin>>n;
    int a[n+1][n+1];
    for(i=0;i<n;i++){
        for(j=0;j<n;j++) cin>>a[i][j];
    }
    for(i=1;i<=n;i++) cout<<i<<" ";
    cout<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};

 bool in[1000100];

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("out.txt", "w", stdout);
    #endif
    int n, j, i, k, c;
    cin>>n;
    int a[n+1][n+1];
    int b[n+1];
    for(i=1;i<=n;i++){
        for(j=1;j<=n;j++) cin>>a[i][j];
    }
    int x=a[1][2]; int s=sqrt(x);
    vi v, print, st;
    for(i=1;i<=s;i++){
        if(x%i==0){
            if(i==x/i) v.pb(i);
            else{
                v.pb(i);
                v.pb(x/i);
            }
        }
    }
    for(i=0;i<v.sz;i++){
        int f=0;
        set <int> s;
        for(j=1;j<=n;j++){
            if(a[1][j]%v[i]!=0){
                f=1;
                break;
            }
            else{
               // if(i==0)cout<<a[1][j]/v[i]<<endl;
                print.pb(a[1][j]/v[i]);
                st.pb(a[1][j]/v[i]);
                s.insert(a[1][j]/v[i]);
                c++;
            }
        }
        if(f==0){
            sort(st.begin(), st.end());
            if((st.back()-st[0])==s.sz-1) {
                break;
            }
        }
        else{
            s.clear();
            print.clear();
            st.clear();
        }

    }
    cout<<a[1][2]/print[1]<<" ";
    for(i=1;i<n;i++){
        cout<<print[i]<<" ";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("out.txt", "w", stdout);
    #endif
    int n, j, i;
    cin>>n;
    int a[n+1][n+1];
    for(i=0;i<n;i++){
        for(i=j;i<n;i++) cin>>a[i][j];
    }
    for(i=1;i<=n;i++) cout<<i<<" ";
    cout<<endl;
    return 0;
}


#include <bits/stdc++.h>
#include <ctype.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define PI acos(-1.0)
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
#define MOD 1000000007
#define MOD1 1000000005
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};
int dx4[] = {0, 0, 1, 1};
int dy4[] = {1, -1, 1, -1};
//#define fio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("out.txt", "w", stdout);
    #endif
    int n, i, j;
    ll x;
    cin>>n; ll a[n+1][n+1]; vi ans;
    for(i=1;i<=n;i++){
        for(j=1;j<=n;j++)cin>>a[i][j];
    }
    x=(a[1][2]*a[1][3]);
    x=x/a[2][3];
    x=sqrt(x); ans.pb(x);
    for(j=2;j<=n;j++)ans.pb(a[1][j]/x);
    for(i=0;i<n;i++)cout<<ans[i]<<" ";
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};

 bool in[1000100];

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("out.txt", "w", stdout);
    #endif
    int n, j, i, k, c;
    cin>>n;
    int a[n+1][n+1];
    int b[n+1];
    for(i=1;i<=n;i++){
        for(j=1;j<=n;j++) cin>>a[i][j];
    }
    int x=a[1][2]; int s=sqrt(x);
    vi v, print, st;
    for(i=1;i<=s;i++){
        if(x%i==0){
            if(i==x/i) v.pb(i);
            else{
                v.pb(i);
                v.pb(x/i);
            }
        }
    }
    for(i=0;i<v.sz;i++){
        int f=0;
        set <int> s;
        for(j=1;j<=n;j++){
            if(a[1][j]%v[i]!=0 || a[j][1]%v[i]!=0){
                f=1;
                break;
            }
            else if(a[1][j]%v[i]==0 && a[j][1]%v[i]==0){
               // if(i==0)cout<<a[1][j]/v[i]<<endl;
                print.pb(a[1][j]/v[i]);
                st.pb(a[1][j]/v[i]);
                s.insert(a[1][j]/v[i]);
                c++;
            }
        }
        if(f==0){
            sort(st.begin(), st.end());
            if((st.back()-st[0])==s.sz-1) {
                break;
            }
        }
        else{
            s.clear();
            print.clear();
            st.clear();
        }

    }
    cout<<a[1][2]/print[1]<<" ";
    for(i=1;i<n;i++){
        cout<<print[i]<<" ";
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz size()
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1};

 bool in[1000100];

int main()
{
    #ifndef ONLINE_JUDGE
    freopen ("in.txt", "r", stdin);
    freopen ("out.txt", "w", stdout);
    #endif
    int n, j, i, k, c, ans;
    cin>>n;
    int a[n+1][n+1];
    int b[n+1];
    for(i=1;i<=n;i++){
        for(j=1;j<=n;j++) cin>>a[i][j];
    }
    int x=a[1][2]; int s=sqrt(x);
    vi v, print;
    for(i=1;i<=s;i++){
        if(x%i==0){
            if(i==x/i) v.pb(i);
            else{
                v.pb(i);
                v.pb(x/i);
            }
        }
    }
    for(i=0;i<v.sz;i++){
        int f=0;
        for(j=1;j<=n;j++){
            if(a[1][j]%v[i]!=0 || a[j][1]%v[i]!=0){
                f=1;
                break;
            }
            else if(a[1][j]%v[i]==0 && a[j][1]%v[i]==0){
                print.pb(a[1][j]/v[i]);
            }
        }
        if(f==0){
            ans=v[i];
            break;
        }
        else print.clear();
    }
    cout<<ans<<" ";
    for(i=1;i<n;i++){
        cout<<print[i]<<" ";
    }
    return 0;
}


#include<algorithm>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)

ll gcd(ll a, ll b){
    return min(a%b,b%a)==0?min(a,b):gcd(a%b,b%a);
}

int main(){
    nosync;
    ll n;
    cin >> n;
    ll m[n][n];
    For(i,0,n)For(j,0,n)cin>>m[i][j];
    if (n==2){
        cout << "1 " << m[0][1] << endl;
        return 0;
    }
    ll m0[n-1];copy(m[0]+1,m[0]+n,m0);
    sort(m0,m0+n-1);
    ll dupe=-1;
    ll a0=-1;
    For(i,0,n-2){
        if (m0[i]==m0[i+1]){
            dupe=m0[i];
            break;
        }
    }
    /*
    For(i,1,n-1){
        if (m[i+1][0]==m[i+1][i]){
            a0=sqrt(m[0][i]);
            break;
        }
    }
    if (m[1][0]==m[1][n-1])a0=sqrt(m[0][n-1]);
    */
    if (dupe!=-1){
        ll i=-1,j=-1;
        For(I,0,n-1){
            if (m[0][I]==dupe){
                if(i==-1)
                    i=I;
                else{
                    j=I;
                    break;
                }
            }
        }
        a0=sqrt(m[i][j]);
    }
    else if (a0==-1){
        a0=1;
        ll g[n];
        For(i,1,n-1){
            g[i]=m[n-1][0]/gcd(m[n-1][0],m[n-1][i]);
        }
        g[n-1]=m[n-2][0]/gcd(m[n-2][0],m[n-2][n-1]);
        For(i,1,n){
            a0=a0*g[i]/gcd(a0,g[i]);
        }
    }
    cout << a0;
    For(i,1,n){
        cout<<' '<<m[0][i]/a0;
    }
    cout << endl;
}


#include<algorithm>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)

ll gcd(ll a, ll b){
    return min(a%b,b%a)==0?min(a,b):gcd(a%b,b%a);
}

int main(){
    nosync;
    ll n;
    cin >> n;
    ll m[n][n];
    For(i,0,n)For(j,0,n)cin>>m[i][j];
    if (n==2){
        cout << "1 " << m[0][1] << endl;
        return 0;
    }
    ll m0[n-1];copy(m[0]+1,m[0]+n,m0);
    sort(m0,m0+n-1);
    ll dupe=-1;
    ll a0=-1;
    /*
    For(i,0,n-2){
        if (m0[i]==m0[i+1]){
            dupe=m0[i];
            break;
        }
    }
    For(i,1,n-1){
        if (m[i+1][0]==m[i+1][i]){
            a0=sqrt(m[0][i]);
            break;
        }
    }
    if (m[1][0]==m[1][n-1])a0=sqrt(m[0][n-1]);
    */
    if (dupe!=-1){
        ll i=-1,j=-1;
        For(I,0,n-1){
            if (m[0][I]==dupe){
                if(i==-1)
                    i=I;
                else{
                    j=I;
                    break;
                }
            }
        }
        a0=sqrt(m[i][j]);
    }
    else if (a0==-1){
        a0=1;
        ll g[n];
        For(i,1,n-1){
            g[i]=m[n-1][0]/gcd(m[n-1][0],m[n-1][i]);
        }
        g[n-1]=m[n-2][0]/gcd(m[n-2][0],m[n-2][n-1]);
        For(i,1,n){
            a0=a0*g[i]/gcd(a0,g[i]);
        }
    }
    cout << a0;
    For(i,1,n){
        cout<<' '<<m[0][i]/a0;
    }
    cout << endl;
}


#include<algorithm>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)

ll gcd(ll a, ll b){
    return min(a%b,b%a)==0?min(a,b):gcd(a%b,b%a);
}

int main(){
    nosync;
    ll n;
    cin >> n;
    ll m[n][n];
    For(i,0,n)For(j,0,n)cin>>m[i][j];
    if (n==2){
        cout << "1 " << m[0][1] << endl;
        return 0;
    }
    ll m0[n-1];copy(m[0]+1,m[0]+n,m0);
    sort(m0,m0+n-1);
    ll dupe=-1;
    For(i,0,n-2){
        if (m0[i]==m0[i+1]){
            dupe=m0[i];
            break;
        }
    }
    ll a0=-1;
    For(i,1,n-1){
        if (m[i+1][0]==m[i+1][i]){
            a0=sqrt(m[0][i]);
            break;
        }
    }
    if (m[1][0]==m[1][n-1])a0=sqrt(m[0][n-1]);
    if (dupe!=-1){
        ll i=-1,j=-1;
        For(I,0,n-1){
            if (m[0][I]==dupe){
                if(i==-1)
                    i=I;
                else{
                    j=I;
                    break;
                }
            }
        }
        a0=sqrt(m[i][j]);
    }
    else if (a0==-1){
        a0=1;
        ll g[n];
        For(i,1,n-1){
            g[i]=m[n-1][0]/gcd(m[n-1][0],m[n-1][i]);
        }
        g[n-1]=m[n-2][0]/gcd(m[n-2][0],m[n-2][n-1]);
        For(i,1,n){
            a0=a0*g[i]/gcd(a0,g[i]);
        }
    }
    cout << a0;
    For(i,1,n){
        cout<<' '<<m[0][i]/a0;
    }
    cout << endl;
}


#include<algorithm>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)

ll gcd(ll a, ll b){
    return min(a%b,b%a)==0?min(a,b):gcd(a%b,b%a);
}

int main(){
    nosync;
    ll n;
    cin >> n;
    ll m[n][n];
    For(i,0,n)For(j,0,n)cin>>m[i][j];
    if (n==2){
        cout << "1 " << m[0][1] << endl;
        return 0;
    }
    ll m0[n-1];copy(m[0]+1,m[0]+n,m0);
    sort(m0,m0+n-1);
    ll dupe=-1;
    For(i,0,n-2){
        if (m0[i]==m0[i+1]){
            dupe=m0[i];
            break;
        }
    }
    For(i,1,n){
        if(m[i][0]==m[i][n-1]){
            dupe=m[i][0];
            break;
        }
    }
    ll a0=1;
    if (dupe!=-1){
        ll i=-1,j=-1;
        For(I,0,n-1){
            if (m[0][I]==dupe){
                if(i==-1)
                    i=I;
                else{
                    j=I;
                    break;
                }
            }
        }
        a0=sqrt(m[i][j]);
    }
    else{
        ll g[n];
        For(i,1,n-1){
            g[i]=m[n-1][0]/gcd(m[n-1][0],m[n-1][i]);
        }
        g[n-1]=m[n-2][0]/gcd(m[n-2][0],m[n-2][n-1]);
        For(i,1,n){
            a0=a0*g[i]/gcd(a0,g[i]);
        }
    }
    cout << a0;
    For(i,1,n){
        cout<<' '<<m[0][i]/a0;
    }
    cout << endl;
}


#include<algorithm>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)

ll gcd(ll a, ll b){
    return min(a%b,b%a)==0?min(a,b):gcd(a%b,b%a);
}

int main(){
    nosync;
    ll n;
    cin >> n;
    ll m[n][n];
    For(i,0,n)For(j,0,n)cin>>m[i][j];
    if (n==2){
        cout << "1 " << m[0][1] << endl;
        return 0;
    }
    ll m0[n-1];copy(m[0]+1,m[0]+n,m0);
    sort(m0,m0+n-1);
    ll dupe=-1;
    ll a0=-1;
    For(i,0,n-2){
        if (m0[i]==m0[i+1]){
            dupe=m0[i];
            ll ii=-1,jj=-1;
            For(i,1,n-1){
                if (m[0][i]==dupe){
                    if(ii==-1)
                        ii=i;
                    else{
                        jj=i;
                        break;
                    }
                }
            }
            ll a=sqrt(m[ii][jj]);
            For(i,0,n){
                if (i==ii||i==jj)
                    cout << a << ' ';
                else
                    cout << m[ii][i]/a << ' ';
            }
            cout << endl;
            return 0;
        }
    }
    For(i,1,n-1){
        if (m[i+1][0]==m[i+1][i]){
            a0=sqrt(m[0][i]);
            break;
        }
    }
    if (m[1][0]==m[1][n-1])a0=sqrt(m[0][n-1]);
    if (a0==-1){
        a0=1;
        ll g[n];
        For(i,1,n-1){
            g[i]=m[n-1][0]/gcd(m[n-1][0],m[n-1][i]);
        }
        g[n-1]=m[n-2][0]/gcd(m[n-2][0],m[n-2][n-1]);
        For(i,1,n){
            a0=a0*g[i]/gcd(a0,g[i]);
        }
    }
    cout << a0;
    For(i,1,n){
        cout<<' '<<m[0][i]/a0;
    }
    cout << endl;
}


#include<algorithm>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)

ll gcd(ll a, ll b){
    return min(a%b,b%a)==0?min(a,b):gcd(a%b,b%a);
}

int main(){
    ll n;
    cin >> n;
    ll m[n][n];
    For(i,0,n)For(j,0,n)cin>>m[i][j];
    if (n==2){
        cout << "1 " << m[0][1] << endl;
        return 0;
    }
    bool skip=false;
    ll a0=1;
    ll g[n];
    For(i,1,n-1){
        g[i]=m[n-1][0]/gcd(m[n-1][0],m[n-1][i]);
        if (g[i]==1&&m[n-1][0]==m[n-1][i]){
            a0=sqrt(m[n-1][0]);
            skip=true;
            break;
        }
    }
    if (!skip){
        g[n-1]=m[n-2][0]/gcd(m[n-2][0],m[n-2][n-1]);
        For(i,1,n){
            a0=a0*g[i]/gcd(a0,g[i]);
        }
    }
    cout << a0;
    For(i,1,n){
        cout<<' '<<m[0][i]/a0;
    }
    cout << endl;
}


#include<algorithm>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)

ll gcd(ll a, ll b){
    return min(a%b,b%a)==0?min(a,b):gcd(a%b,b%a);
}

int main(){
    ll n;
    cin >> n;
    ll m[n][n];
    For(i,0,n)For(j,0,n)cin>>m[i][j];
    if (n==2){
        cout << "1 " << m[0][1] << endl;
        return 0;
    }
    bool skip=false;
    ll a0=1;
    ll g[n];
    For(i,1,n-1){
        g[i]=m[n-1][0]/gcd(m[n-1][0],m[n-1][i]);
        if (g[i]==1&&m[n-1][0]==m[n-1][i]){
            a0=sqrt(m[0][i]);
            skip=true;
            break;
        }
    }
    if (!skip){
        g[n-1]=m[n-2][0]/gcd(m[n-2][0],m[n-2][n-1]);
        For(i,1,n){
            a0=a0*g[i]/gcd(a0,g[i]);
        }
    }
    cout << a0;
    For(i,1,n){
        cout<<' '<<m[0][i]/a0;
    }
    cout << endl;
}


#include<algorithm>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)

ll gcd(ll a, ll b){
    return min(a%b,b%a)==0?min(a,b):gcd(a%b,b%a);
}

int main(){
    nosync;
    ll n;
    cin >> n;
    ll m[n][n];
    For(i,0,n)For(j,0,n)cin>>m[i][j];
    if (n==2){
        cout << "1 " << m[0][1] << endl;
        return 0;
    }
    ll m0[n-1];copy(m[0]+1,m[0]+n,m0);
    sort(m0,m0+n-1);
    ll dupe=-1;
    For(i,0,n-2){
        if (m0[i]==m0[i+1]){
            dupe=m0[i];
            break;
        }
    }
    For(i,1,n){
        if(m[i][0]==m[i][n-1]){
            dupe=m[i][0];
            break;
        }
    }
    ll a0=1;
    dupe=-1;
    if (dupe!=-1){
        ll i=-1,j=-1;
        For(I,0,n-1){
            if (m[0][I]==dupe){
                if(i==-1)
                    i=I;
                else{
                    j=I;
                    break;
                }
            }
        }
        a0=sqrt(m[i][j]);
    }
    else{
        ll g[n];
        For(i,1,n-1){
            g[i]=m[n-1][0]/gcd(m[n-1][0],m[n-1][i]);
        }
        g[n-1]=m[n-2][0]/gcd(m[n-2][0],m[n-2][n-1]);
        For(i,1,n){
            a0=a0*g[i]/gcd(a0,g[i]);
        }
    }
    cout << a0;
    For(i,1,n){
        cout<<' '<<m[0][i]/a0;
    }
    cout << endl;
}


#include<algorithm>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)

ll gcd(ll a, ll b){
    return min(a%b,b%a)==0?min(a,b):gcd(a%b,b%a);
}

int main(){
    nosync;
    ll n;
    cin >> n;
    ll m[n][n];
    For(i,0,n)For(j,0,n)cin>>m[i][j];
    if (n==2){
        cout << "1 " << m[0][1] << endl;
        return 0;
    }
    ll m0[n];copy(m[0],m[0]+n,m0);
    sort(m0,m0+n);
    ll dupe=-1;
    For(i,0,n-1){
        if (m0[i]==m0[i+1]||m0[i]==m[0][n-1]){
            dupe=m0[i];
        }
    }
    ll a0=1;
    if (dupe!=-1){
        ll i=-1,j=-1;
        For(I,0,n-1){
            if (m[0][I]==dupe){
                if(i==-1)
                    i=I;
                else{
                    j=I;
                    break;
                }
            }
        }
        a0=sqrt(m[i][j]);
    }
    else{
        ll g[n];
        For(i,1,n-1){
            g[i]=m[n-1][0]/gcd(m[n-1][0],m[n-1][i]);
        }
        g[n-1]=m[n-2][0]/gcd(m[n-2][0],m[n-2][n-1]);
        For(i,1,n){
            a0=a0*g[i]/gcd(a0,g[i]);
        }
    }
    cout << a0;
    For(i,1,n){
        cout<<' '<<m[0][i]/a0;
    }
    cout << endl;
}


#include<algorithm>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)
int main(){
    int n;
    cin >> n;
    int m[n][n];
    For(i,0,n)
        For(j,0,n)
            cin >> m[i][j];
    ll ab = m[0][1], ac = m[0][2], bc = m[1][2];
    int a = sqrt(ab * ac / bc);
    cout << a;
    For(i,1,n)
        cout <<  ' ' << m[0][i]/a;
    cout << endl;
}


#include<algorithm>
#include<iostream>
#include<vector>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)

ll gcd(ll a, ll b){
    return min(a%b,b%a)==0?min(a,b):gcd(a%b,b%a);
}

int main(){
    ll n;
    cin >> n;
    ll m[n][n];
    For(i,0,n)For(j,0,n)cin>>m[i][j];
    if (n==2){
        cout << "1 " << m[0][1] << endl;
        return 0;
    }
    ll g[n];
    For(i,1,n-1){
        g[i]=m[n-1][0]/gcd(m[n-1][0],m[n-1][i]);
    }
    g[n-1]=m[n-2][0]/gcd(m[n-2][0],m[n-2][n-1]);
    ll a0=1;
    For(i,1,n){
        a0=a0*g[i]/gcd(a0,g[i]);
    }
    cout << a0;
    For(i,1,n){
        cout<<' '<<m[0][i]/a0;
    }
    cout << endl;
}


#include<algorithm>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;
#define ll long long
#define uint unsigned
#define ull unsigned ll
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define nosync ios::sync_with_stdio(false)

ll gcd(ll a, ll b){
    return min(a%b,b%a)==0?min(a,b):gcd(a%b,b%a);
}

int main(){
    nosync;
    ll n;
    cin >> n;
    ll m[n][n];
    For(i,0,n)For(j,0,n)cin>>m[i][j];
    if (n==2){
        cout << "1 " << m[0][1] << endl;
        return 0;
    }
    ll m0[n];copy(m[n-1],m[n-1]+n-1,m0);
    sort(m0,m0+n-1);
    ll dupe=-1;
    For(i,0,n-2){
        if (m0[i]==m0[i+1]){
            dupe=m0[i];
            break;
        }
    }
    For(i,1,n){
        if(m[i][0]==m[i][n-1]){
            dupe=m[i][0];
            break;
        }
    }
    ll a0=1;
    if (dupe!=-1){
        ll i=-1,j=-1;
        For(I,0,n-1){
            if (m[0][I]==dupe){
                if(i==-1)
                    i=I;
                else{
                    j=I;
                    break;
                }
            }
        }
        a0=sqrt(m[i][j]);
    }
    else{
        ll g[n];
        For(i,1,n-1){
            g[i]=m[n-1][0]/gcd(m[n-1][0],m[n-1][i]);
        }
        g[n-1]=m[n-2][0]/gcd(m[n-2][0],m[n-2][n-1]);
        For(i,1,n){
            a0=a0*g[i]/gcd(a0,g[i]);
        }
    }
    cout << a0;
    For(i,1,n){
        cout<<' '<<m[0][i]/a0;
    }
    cout << endl;
}


#include <bits/stdc++.h>
using namespace std;
const long long N = 1e4,OO=1e18;
vector<int> getdiv(int n)
{
    vector<int>ret;
    for(int i=1; i<=n/i; i++)
    {
        if(n%i==0)
        {
            ret.push_back(i);
            ret.push_back(n/i);
        }
    }
    return ret;
}
int arr[N][N];
int main()
{
    int n;
    scanf("%d",&n);
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
        {
            scanf("%d",&arr[i][j]);
        }
    }
    auto v=getdiv(arr[0][1]);
    for(int i=0; i<v.size(); i++)
    {

        vector<int>temp;
        temp.push_back(v[i]);
        for( int j=1;j<n;j++){
            temp.push_back(arr[j][0]/v[i]);
        }
        bool flag=1;
        for(int j=0; j<n; j++)
        {
            for(int y=0; y<n; y++)
            {
                if(j==y)continue;
                flag&=(temp[j]*temp[y]==arr[j][y]);
            }
        }
        if(flag){
            for(auto vv:temp)cout<<vv<<" ";

            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long N = 1e3+2,OO=1e18;
vector<ll> getDivisors(ll n)        //O(sqrt(n))
{
    vector<ll>ret;
    ll i;
    for(i = 1 ; i < n/i ; ++i)
    {
        if(n%i == 0)
        {
            ret.push_back(i);
            ret.push_back(n/i);
        }
    }
    if(i == n/i && n%i==0)    ret.push_back(i);
    return ret;
}
ll arr[N][N];
int main()
{
    ll n;
    scanf("%lld",&n);
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
        {
            scanf("%lld",&arr[i][j]);
        }
    }
    auto v=getDivisors(arr[0][1]);
    vector<ll>temp;
    for(int i=0; i<v.size(); i++)
    {

        temp.clear();
        temp.push_back(v[i]);
        for( int j=1;j<n;j++){
            temp.push_back(arr[j][0]/v[i]);
        }
        bool flag=1;
        for(int j=0; j<n; j++)
        {
            for(int y=j+1; y<n; y++)
            {
                if(j==y)continue;
                flag&=(temp[j]*temp[y]==arr[j][y]);
            }
        }
        if(flag){
            for(auto vv:temp)printf("%lld ",vv);

            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long N = 1e3+2,OO=1e18;
vector<ll> getdiv(ll n)
{
    vector<ll>ret;
    for(int i=1; i<=n/i; i++)
    {
        if(n%i==0)
        {
            ret.push_back(i);
            ret.push_back(n/i);
        }
    }
    return ret;
}
ll arr[N][N];
int main()
{
    ll n;
    scanf("%lld",&n);
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
        {
            scanf("%lld",&arr[i][j]);
        }
    }
    auto v=getdiv(arr[0][1]);
    for(int i=0; i<v.size(); i++)
    {

        vector<ll>temp;
        temp.push_back(v[i]);
        for( int j=1;j<n;j++){
            temp.push_back(arr[j][0]/v[i]);
        }
        bool flag=1;
        for(int j=0; j<n; j++)
        {
            for(int y=0; y<n; y++)
            {
                if(j==y)continue;
                flag&=(temp[j]*temp[y]==arr[j][y]);
            }
        }
        if(flag){
            for(auto vv:temp)printf("%lld ",vv);

            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
const long long N = 1e4,OO=1e18;
int arr[N];
int main()
{
    int y=0;
    int n;
    scanf("%d",&n);
    int ans=0;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            int x;
            scanf("%d",&x);
            if(i==0){
                ans=__gcd(ans,x);
                arr[y++]=x;
            }
        }
    }
    printf("%d ",ans);
    for(int i=1;i<y;i++){
        printf("%d ",arr[i]/ans);
    }
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long N = 1e3+2,OO=1e18;
vector<ll> getDivisors(ll n)        //O(sqrt(n))
{
    vector<ll>ret;
    ll i;
    for(i = 1 ; i < n/i ; ++i)
    {
        if(n%i == 0)
        {
            ret.push_back(i);
            ret.push_back(n/i);
        }
    }
    if(i == n/i && n%i==0)    ret.push_back(i);
    return ret;
}
ll arr[N][N];
int main()
{
    ll n;
    scanf("%lld",&n);
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
        {
            scanf("%lld",&arr[i][j]);
        }
    }
    auto v=getDivisors(arr[0][1]);
    vector<ll>temp;
    for(int i=0; i<v.size(); i++)
    {

        temp.clear();
        temp.push_back(v[i]);
        for( int j=1;j<n;j++){
            temp.push_back(arr[j][0]/v[i]);
        }
        bool flag=1;
        for(int j=0; j<n; j++)
        {
            for(int y=0; y<n; y++)
            {
                if(j==y)continue;
                flag&=(temp[j]*temp[y]==arr[j][y]);
            }
        }
        if(flag){
            for(auto vv:temp)printf("%lld ",vv);

            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
const long long N = 1e3+2,OO=1e18;
vector<int> getdiv(int n)
{
    vector<int>ret;
    for(int i=1; i<=n/i; i++)
    {
        if(n%i==0)
        {
            ret.push_back(i);
            ret.push_back(n/i);
        }
    }
    return ret;
}
int arr[N][N];
int main()
{
    int n;
    scanf("%d",&n);
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
        {
            scanf("%d",&arr[i][j]);
        }
    }
    auto v=getdiv(arr[0][1]);
    for(int i=0; i<v.size(); i++)
    {

        vector<int>temp;
        temp.push_back(v[i]);
        for( int j=1;j<n;j++){
            temp.push_back(arr[j][0]/v[i]);
        }
        bool flag=1;
        for(int j=0; j<n; j++)
        {
            for(int y=0; y<n; y++)
            {
                if(j==y)continue;
                flag&=(temp[j]*temp[y]==arr[j][y]);
            }
        }
        if(flag){
            for(auto vv:temp)cout<<vv<<" ";

            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long N = 1e3+2,OO=1e18;
vector<ll> getDivisors(ll n)        //O(sqrt(n))
{
    vector<ll>ret;
    ll i;
    for(i = 1 ; i < n/i ; ++i)
    {
        if(n%i == 0)
        {
            ret.push_back(i);
            ret.push_back(n/i);
        }
    }
    if(i == n/i && n%i==0)    ret.push_back(i);
    return ret;
}
ll arr[N][N];
int main()
{
    ll n;
    scanf("%lld",&n);
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
        {
            scanf("%lld",&arr[i][j]);
        }
    }
    auto v=getDivisors(arr[0][1]);
    vector<ll>temp;
    for(int i=0; i<v.size(); i++)
    {

        temp.clear();
        temp.push_back(v[i]);
        for( int j=1;j<n;j++){
            temp.push_back(arr[j][0]/v[i]);
        }
        bool flag=1;
        for(int j=0; j<n; j++)
        {
            bool f=0;
            for(int y=j+1; y<n; y++)
            {
                if(j==y)continue;
                flag&=(temp[j]*temp[y]==arr[j][y]);
                if(flag==0){
                    f=1;
                    break;
                }
            }
            if(f)break;
        }
        if(flag){
            for(auto vv:temp)printf("%lld ",vv);

            return 0;
        }
    }
}


 #include <bits/stdc++.h>
 using namespace std ;
 #define ll long long
  const int N=1e3 + 5;
  int arr[N][N];
int n,m,k;
int  main(){
        vector<int> vec;
        scanf("%d",&n);
        for(int i=0;i<n;++i){
            for(int j=0;j<n;++j)
                scanf("%d",arr[i]+j);
        }
        int g=0;
        for(int i=0;i<n;++i)
            g=__gcd(g,arr[i][n>>1]);
        for(int i=0;i<n;++i){
            arr[i][n>>1]/=g;
            vec.push_back(arr[i][n>>1]);
        }
        for(int i=0;i<n;++i){
            if(vec[i])
                printf("%d ",vec[i]);
            else
                printf("%d ",g);

        }

    }


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long N = 1e3+2,OO=1e18;
vector<ll> getDivisors(ll n)        //O(sqrt(n))
{
    vector<ll>ret;
    ll i;
    for(i = 1 ; i < n/i ; ++i)
    {
        if(n%i == 0)
        {
            ret.push_back(i);
            ret.push_back(n/i);
        }
    }
    if(i == n/i && n%i==0)    ret.push_back(i);
    return ret;
}
ll arr[N][N];
int main()
{
    ll n;
    scanf("%lld",&n);
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
        {
            scanf("%lld",&arr[i][j]);
        }
    }
    auto v=getDivisors(arr[0][1]);
    for(int i=0; i<v.size(); i++)
    {

        vector<ll>temp;
        temp.push_back(v[i]);
        for( int j=1;j<n;j++){
            temp.push_back(arr[j][0]/v[i]);
        }
        bool flag=1;
        for(int j=0; j<n; j++)
        {
            for(int y=0; y<n; y++)
            {
                if(j==y)continue;
                flag&=(temp[j]*temp[y]==arr[j][y]);
            }
        }
        if(flag){
            for(auto vv:temp)printf("%lld ",vv);

            return 0;
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long N = 1e3+2,OO=1e18;
vector<ll> getdiv(ll n)
{
    vector<ll>ret;
    for(int i=1; i<=n/i; i++)
    {
        if(n%i==0)
        {
            ret.push_back(i);
            ret.push_back(n/i);
        }
    }
    return ret;
}
ll arr[N][N];
int main()
{
    ll n;
    scanf("%lld",&n);
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
        {
            scanf("%lld",&arr[i][j]);
        }
    }
    auto v=getdiv(arr[0][1]);
    for(int i=0; i<v.size(); i++)
    {

        vector<ll>temp;
        temp.push_back(v[i]);
        for( int j=1;j<n;j++){
            temp.push_back(arr[j][0]/v[i]);
        }
        bool flag=1;
        for(int j=0; j<n; j++)
        {
            for(int y=0; y<n; y++)
            {
                if(j==y)continue;
                flag&=(temp[j]*temp[y]==arr[j][y]);
            }
        }
        if(flag){
            for(auto vv:temp)cout<<vv<<" ";

            return 0;
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll arr[1005][1005];
ll brr[1005][1005];
ll f[1005];
int main()
{
    int n;
    cin>>n;
    int gcd = 0;
    for(int i = 1; i<=n; i++)
    {
        for(int j = 1; j<=n; j++)
        {
            scanf("%lld", &arr[i][j]);
            if(i == 1) gcd = __gcd(gcd,arr[i][j]);
        }
    }
    vector<ll>vc;
    int sq = sqrt(gcd);
    for(ll i = 1; i<=sq; i++)
    {
        if(gcd%i == 0)
        {
            vc.push_back(i);
            vc.push_back(gcd/i);
        }
    }
    int sz = vc.size();
    for(int i = 0; i < sz; i++)
    {
        f[1] = vc[i];
        for(int j = 2; j<=n; j++) f[j] = arr[1][j]/f[1];
        for(int ii = 1; ii<=n; ii++)
        {
            for(int jj = 1; jj<=n; jj++)
            {
                brr[ii][jj] = f[ii]*f[jj];
            }
        }
        int ck = 0;
        for(int ii = 1; ii<=n; ii++)
        {
            for(int jj = 1; jj<=n; jj++)
            {
                if(ii == jj) continue;
                else if(arr[ii][jj] != brr[ii][jj])
                    ck = 1;
            }
        }
        if(ck == 0)
        {
            for(int jj = 1; jj<=n; jj++)
                cout<<f[jj]<<" ";
            return 0;
        }
    }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll arr[1005][1005];
ll brr[1005][1005];
ll f[1005];
int main()
{
    int n;
    cin>>n;
    ll gcd = 0;
    for(int i = 1; i<=n; i++)
    {
        for(int j = 1; j<=n; j++)
        {
            scanf("%lld", &arr[i][j]);
            if(i == 1) gcd = __gcd(gcd,arr[i][j]);
        }
    }
    vector<ll>vc;
    int sq = sqrt(gcd);
    for(ll i = 1; i<=sq; i++)
    {
        if(gcd%i == 0)
        {
            vc.push_back(i);
            vc.push_back(gcd/i);
        }
    }
    int sz = vc.size();
    for(int i = 0; i < sz; i++)
    {
        f[1] = vc[i];
        for(int j = 2; j<=n; j++) f[j] = arr[1][j]/f[1];
        for(int ii = 1; ii<=n; ii++)
        {
            for(int jj = 1; jj<=n; jj++)
            {
                brr[ii][jj] = f[ii]*f[jj];
            }
        }
        int ck = 0;
        for(int ii = 1; ii<=n; ii++)
        {
            for(int jj = 1; jj<=n; jj++)
            {
                if(ii == jj) continue;
                else if(arr[ii][jj] != brr[ii][jj])
                    ck = 1;
            }
        }
        if(ck == 0)
        {
            for(int jj = 1; jj<=n; jj++)
                cout<<f[jj]<<" ";
            return 0;
        }
    }
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <string>
using  namespace std;
typedef double ll;
#define pa pair<ll,ll>
#define pb push_back
#define F first
#define S second
#define mod 1000000007
#define MAX 1<<31
#define mp make_pair
const int N =100005;

int main()
{
    int n;
    cin>>n;
    ll a[n][n];
    ll ans;
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<n;j++)
        {
            cin>>a[i][j];
        }
    }
    ll m=a[0][2];
    ll k=a[1][2];
    ll p=a[0][1];
    ll s=(m*k*p);
    s=sqrt(s);
    ans=s/k;
    cout<<ans<<" ";
    for(int i=1;i<n;i++)
    {
        cout<<(a[0][i]/ans)<<" ";
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <string>
using  namespace std;
typedef unsigned long long ll;
#define pa pair<ll,ll>
#define pb push_back
#define F first
#define S second
#define mod 1000000007
#define MAX 1<<31
#define mp make_pair
const int N =100005;

ll solve(ll a,ll b,ll c)
{
    ll n=__gcd(a,b);
    for(ll i=1;i<=n;i++)
    {
        if(a%i==0 && b%i==0)
        {
            ll p=a/i;
            ll q=b/i;
            if(p*q == c)
            {
                return p;
            }
        }
    }
}

int main()
{
    ll n;
    cin>>n;
    ll a[n][n];
    ll ans;
    for(ll i=0;i<n;i++)
    {
        for(ll j=0;j<n;j++)
        {
            cin>>a[i][j];
        }
    }
    ll m=a[0][2];
    ll k=a[1][2];
    ll p=a[0][1];
    ans=solve(m,k,p);
    cout<<ans<<" ";
    for(ll i=1;i<n;i++)
    {
        cout<<(a[0][i]/ans)<<" ";
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <string>
using  namespace std;
typedef double ll;
#define pa pair<ll,ll>
#define pb push_back
#define F first
#define S second
#define mod 1000000007
#define MAX 1<<31
#define mp make_pair
const int N =100005;

int main()
{
    int n;
    cin>>n;
    ll a[n][n];
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<n;j++)
        {
            cin>>a[i][j];
        }
    }
    ll m=(a[0][2]);
    ll k=a[1][2];
    ll p=a[0][1];
    ll s=(m*p)/k;
    s=sqrt(s);
    cout<<s<<" ";
    for(int i=1;i<n;i++)
    {
        cout<<(a[0][i]/s)<<" ";
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <string>
using  namespace std;
typedef long long ll;
#define pa pair<ll,ll>
#define pb push_back
#define F first
#define S second
#define mod 1000000007
#define MAX 1<<31
#define mp make_pair
const int N =100005;

int main()
{
    int n;
    cin>>n;
    ll a[n][n];
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<n;j++)
        {
            cin>>a[i][j];
        }
    }
    ll m=(a[0][2]);
    ll k=a[1][2];
    ll p=a[0][1];
    a[0][0]=(m*p)/k;
    ll s=sqrt(a[0][0]);
    cout<<s<<" ";
    for(int i=1;i<n;i++)
    {
        cout<<a[0][i]/s<<" ";
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <string>
using  namespace std;
typedef unsigned long long ll;
#define pa pair<ll,ll>
#define pb push_back
#define F first
#define S second
#define mod 1000000007
#define MAX 1<<31
#define mp make_pair
const int N =100005;

ll solve(ll a,ll b,ll c)
{
    for(ll i=1;i<min(a,b);i++)
    {
        if(a%i==0 && b%i==0)
        {
            ll p=a/i;
            ll q=b/i;
            if(p*q == c)
            {
                return p;
            }
        }
    }
}

int main()
{
    ll n;
    cin>>n;
    ll a[n][n];
    ll val[n];
    for(ll i=0;i<n;i++)
    {
        for(ll j=0;j<n;j++)
        {
            cin>>a[i][j];
        }
    }
    ll m=a[0][2];
    ll k=a[1][2];
    ll p=a[0][1];
    val[0]=solve(m,k,p);
    cout<<val[0]<<" ";
    for(ll i=1;i<n;i++)
    {
        val[i]=(a[0][i])/(val[0]);
        cout<<val[i]<<" ";
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <string>
using  namespace std;
typedef long long ll;
#define pa pair<ll,ll>
#define pb push_back
#define F first
#define S second
#define mod 1000000007
#define MAX 1<<31
#define mp make_pair
const int N =100005;

int main()
{
    ll n;
    cin>>n;
    ll a[n][n];
    ll val[n];
    for(ll i=0;i<n;i++)
    {
        for(ll j=0;j<n;j++)
        {
            cin>>a[i][j];
        }
    }
    for(ll i=0;i<n;i++)
    {
        if(i==0)
        {
            val[i]=a[i][1];
        }
        else val[i]=a[i][0];

        for(ll j=0;j<n;j++)
        {
            if(i!=j)
            {
                val[i]=__gcd(val[i],a[i][j]);
            }
        }
    }

    for(ll i=0;i<n;i++)
    {
        cout<<val[i]<<" ";
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <string>
using  namespace std;
typedef unsigned long long ll;
#define pa pair<ll,ll>
#define pb push_back
#define F first
#define S second
#define mod 1000000007
#define MAX 1<<31
#define mp make_pair
const int N =100005;

ll solve(ll a,ll b,ll c)
{
    for(ll i=1;i<=min(a,b);i++)
    {
        if(a%i==0 && b%i==0)
        {
            ll p=a/i;
            ll q=b/i;
            if(p*q == c)
            {
                return p;
            }
        }
    }
}

int main()
{
    ll n;
    cin>>n;
    ll a[n][n];
    ll val[n];
    for(ll i=0;i<n;i++)
    {
        for(ll j=0;j<n;j++)
        {
            cin>>a[i][j];
        }
    }
    ll m=a[0][2];
    ll k=a[1][2];
    ll p=a[0][1];
    val[0]=solve(m,k,p);
    cout<<val[0]<<" ";
    for(ll i=1;i<n;i++)
    {
        val[i]=(a[0][i])/(val[0]);
        cout<<val[i]<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long c;
    cin>>c;
    long long a[c][c];
    long long b[c];
    for(long long i=0;i<c;i++)
    {
        for(long long j=0;j<c;j++)
        {
            cin>>a[i][j];

        }
    }
    long long k=(a[0][1]*a[0][2])/a[1][2];
    k=sqrt(k);
    b[0]=k;
    cout<<b[0]<<" ";
    for(long long i=1;i<c;i++)
    {
        cout<<a[0][i]/b[0]<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int c;
    cin>>c;
    int a[c][c];
    int b[c];
    for(int i=0;i<c;i++)
    {
        for(int j=0;j<c;j++)
        {
            cin>>a[i][j];

        }
    }
    int k=(a[0][1]*a[0][2])/a[1][2];
    k=sqrt(k);
    b[0]=k;
    cout<<b[0]<<" ";
    for(int i=1;i<c;i++)
    {
        cout<<a[0][i]/b[0]<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int c;
    cin>>c;
    int a[c][c];
    int b[c];
    for(int i=0;i<c;i++)
    {
        for(int j=0;j<c;j++)
        {
            cin>>a[i][j];

        }
    }
    int k=(a[0][1]*a[0][2])/a[1][2];
    k=sqrt(k);
    b[0]=k;
    for(int i=1;i<c;i++)
    {
        cout<<a[0][i]/b[0]<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int c;
    cin>>c;
    int a[c][c];
    int b[c];
    for(int i=0;i<c;i++)
    {
        for(int j=0;j<c;j++)
        {
            cin>>a[i][j];

        }
    }
    int k=0;
    for(int i=0;i<c;i++)
    {
        k=0;
        for(int j=0;j<c&&j!=i;j++)
        {
            if(k<1)
            {
                k++;
            }
            else
            {
             if(a[j-1]!=0)
             {
                 b[i]=__gcd(a[j],a[j-1]);
             }
             else
             {
                 b[i]==__gcd(a[j],a[j-2]);
             }
            }
        }
        cout<<b[i]<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
    int c;
    cin>>c;
    int a[c][c];
    int b[c];
    for(int i=0;i<c;i++)
    {
        for(int j=0;j<c;j++)
        {
            cin>>a[i][j];

        }
    }
    int k=0;
    for(int i=0;i<c;i++)
    {
        k=0;
        for(int j=0;j<c&&j!=i;j++)
        {
            if(k<1)
            {
                k++;
            }
            else
            {
             if(a[j-1]!=0)
             {
                 b[i]=__gcd(a[j]%a[j-1],a[j-1]);
             }
             else
             {
                 b[i]==__gcd(a[j]%a[j-2],a[j-2]);
             }
            }
        }
        cout<<b[i]<<" ";
    }
    return 0;
}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

int main()
{
        ios_base::sync_with_stdio(false);
        cin.tie(0);
        ll n, i, j, k;
        cin>>n;
        vector< vector<ll> > v(n);
        for(i=0; i<n; i++)
        {
                for(j=0; j<n; j++)
                {
                        ll x;
                        cin>>x;
                        v[i].push_back(x);
                }
        }
        for(k=1; k<=sqrt(v[0][1]); k++)
        {
                if(v[0][1]%k==0)
                {
                        vector<ll> a, b;
                        vector< vector<ll> > w(n), z(n);
                        a.push_back(k);
                        for(i=1; i<v[0].size(); i++)
                        a.push_back(v[0][i]/k);

                        for(i=0; i<n; i++)
                        {
                                for(j=0; j<n; j++)
                                {
                                        if(i==j)
                                        w[i].push_back(0);
                                        else w[i].push_back(a[i]*a[j]);
                                }
                        }

                        if(w==v)
                        {
                                for(i=0; i<a.size(); i++)
                                cout<<a[i]<<" ";
                                break;
                        }

                        b.push_back(v[0][1]/k);
                        for(i=1; i<v[0].size(); i++)
                        b.push_back(v[0][i]/b[0]);

                        for(i=0; i<n; i++)
                        {
                            for(j=0; j<n; j++)
                            {
                                if(i==j)
                                z[i].push_back(0);
                                else z[i].push_back(b[i]*b[j]);
                            }
                        }

                        if(z==v)
                        {
                            for(i=0; i<b.size(); i++)
                            cout<<b[i]<<" ";
                            break;
                        }
                }
        }
        return 0;
}


#include <bits/stdc++.h>
#define ll long long int

using namespace std;

int main()
{
        ios_base::sync_with_stdio(false);
        cin.tie(0);
        ll n, i, j, k;
        cin>>n;
        vector< vector<ll> > v(n);
        for(i=0; i<n; i++)
        {
                for(j=0; j<n; j++)
                {
                        ll x;
                        cin>>x;
                        v[i].push_back(x);
                }
        }
        for(k=1; k<=v[0][1]; k++)
        {
                if(v[0][1]%k==0)
                {
                        vector<ll> a;
                        vector< vector<ll> > w(n);

                        a.push_back(k);
                        for(i=1; i<v[0].size(); i++)
                        a.push_back(v[0][i]/k);

                        for(i=0; i<n; i++)
                        {
                                for(j=0; j<n; j++)
                                {
                                        if(i==j)
                                        w[i].push_back(0);
                                        else w[i].push_back(a[i]*a[j]);
                                }
                        }

                        if(w==v)
                        {
                                for(i=0; i<a.size(); i++)
                                cout<<a[i]<<" ";
                                break;
                        }
                }
        }
        return 0;
}


#include<bits/stdc++.h>
using namespace std;
int arr[100012];
int main()
{
    int n;
    string s;
    cin>>n;
    cin>>s;

    if(n==1||n==2)
    {
        cout<<s<<endl;
        return 0;
    }
    if(n%2==0)
    {
        int mid = n/2 - 1;
        int i = mid+1;
        int j = mid-1;
        string ns;
        ns[mid] = s[0];
        int index = 1;
        int kount=1;
        while(1)
        {
            ns[i] = s[index];
            kount++;
            index++;
            i++;
            if(kount==n) break;
            ns[j] = s[index];
            kount++;
            if(kount==n) break;
            j--;
            index++;

        }
        //cout<<ns<<endl;
        for(int i=0;i<n;i++)
        cout<<ns[i];
    }
    else
    {
        int mid = n/2;
        int i = mid+1;
        int j = mid-1;
        string ns;
        ns[mid] = s[0];
        int index = 1;
        int kount=1;
        while(1)
        {
            ns[j] = s[index];
            kount++;
            index++;
            j--;
            if(kount==n) break;
            ns[i] = s[index];
            kount++;
            if(kount==n) break;
            i++;
            index++;

        }
        for(int i=0;i<n;i++)
        cout<<ns[i];
    }
}


#include<bits/stdc++.h>
using namespace std;
int arr[100012];
int main()
{
    int n;
    string s;
    cin>>n;
    cin>>s;

    if(n==1||n==2)
    {
        cout<<s<<endl;
        return 0;
    }
    if(n%2==0)
    {
        int mid = n/2 - 1;
        int i = mid+1;
        int j = mid-1;
        string ns;
        ns[mid] = s[0];
        int index = 1;
        int kount=1;
        for(int k=1;k<n;k++)
        {
            if(k&1)
                {
                    ns[i] = s[k];
                    i++;

                }
                else
                {
                    ns[j] = s[k];
                    j--;
                }

        }
        //cout<<ns<<endl;
        string ans = "";
        for(int i=0;i<n;i++)
        ans = ans+ns[i];
        cout<<ans<<endl;
    }
    else
    {
        int mid = n/2;
        int i = mid+1;
        int j = mid-1;
        string ns;
        ns[mid] = s[0];
        int index = 1;
        int kount=1;
        for(int k=1;k<n;k++)
        {
            if(k&1)
                {
                    ns[j] = s[k];
                    j--;

                }
                else
                {
                    ns[i] = s[k];
                    i++;
                }

        }
        //cout<<ns<<endl;
        string ans = "";
        for(int i=0;i<n;i++)
        ans = ans+ns[i];
        cout<<ans<<endl;
    }
}


#include<bits/stdc++.h>
using namespace std;
int arr[100012];
int main()
{
    int n;
    string s;
    cin>>n;
    cin>>s;

    if(n==1||n==2)
    {
        cout<<s<<endl;
        return 0;
    }
    if(n%2==0)
    {
        int mid = n/2 - 1;
        int i = mid+1;
        int j = mid-1;
        string ns = "";
        ns[mid] = s[0];
        int index = 1;
        int kount=0;
        while(1)
        {
            ns[i] = s[index];
            kount++;
            index++;
            i++;
            if(kount==n) break;
            ns[j] = s[index];
            kount++;
            if(kount==n) break;
            j--;
            index++;

        }
        for(int i=0;i<n;i++)
        cout<<ns[i];
    }
    else
    {
        int mid = n/2;
        int i = mid+1;
        int j = mid-1;
        string ns = "";
        ns[mid] = s[0];
        int index = 1;
        int kount=0;
        while(1)
        {
            ns[j] = s[index];
            kount++;
            index++;
            j--;
            if(kount==n) break;
            ns[i] = s[index];
            kount++;
            if(kount==n) break;
            i++;
            index++;

        }
        for(int i=0;i<n;i++)
        cout<<ns[i];
    }
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define po pop_back
#define ite ::iterator
#define test ll t; cin>>t; while(t--)
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;++i)

int main(){
	std::ios::sync_with_stdio(false);	cin.tie(0);
	ll i,j,op=0,flag,t,len;
	cin>>len;
	string s,s1;
	cin>>s;
	ll x,y=0,z;
	z=x=len;
	j=len-1;
	i=0;
	while(x--){
		if(op==0){
			s1[j]=s[--len];
			op=1;
			j--;
		}
		else{
			s1[i]=s[--len];
			op=0;
			i++;
		}
	}
	for(i=0;i<z;++i){
		cout<<s1[i];
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define po pop_back
#define ite ::iterator
#define test ll t; cin>>t; while(t--)
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;++i)

int main(){
	//std::ios::sync_with_stdio(false);	cin.tie(0);
	ll i,j,x,z,op=0,len;
	cin>>len;
	string s,s1;
	cin>>s;
	s1=s; //correct korechi
	z=x=len;
	j=len-1;
	i=0;
	while(len>0){
		len=len-1;
		if(op==0){
			s1[j]=s[len];
			op=1;
			j--;
		}
		else{
			s1[i]=s[len];
			op=0;
			i++;
		}
	}
	for(i=0;i<z;++i){
		cout<<s1[i];
	}
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define po pop_back
#define ite ::iterator
#define test ll t; cin>>t; while(t--)
#define MOD 1000000007
#define rep(i,n) for(i=0;i<n;++i)

int main(){
	//std::ios::sync_with_stdio(false);	cin.tie(0);
	ll i,j,x,z,op=0,len;
	cin>>len;
	string s,s1;
	cin>>s;
	z=x=len;
	j=len-1;
	i=0;
	while(x--){
		if(op==0){
			s1[j]=s[--len];
			op=1;
			j--;
		}
		else{
			s1[i]=s[--len];
			op=0;
			i++;
		}
	}
	for(i=0;i<z;++i){
		cout<<s1[i];
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
string decoder(int n,string s){
	string temp;
	int index=(n-1)/2;
temp.append(1,s[index]);

if(n%2==0){
for(int i=1;i<=n-1;i++){

	index+=pow(-1,i+1)*i;
	temp.append(1,s[index]);
}

}
else {
	for(int i=1;i<=n-1;i++){
		index+=pow(-1,i)*i;
	temp.append(1,s[index]);
	}
}
return temp;

}
int main(){

int n;
string s;

cin>>n>>s;
if(n==1 || n==2){cout<<s;exit(0);}

cout<<decoder(n,decoder(n,s));

}


// #include<bits/stdc++.h>
// using namespace std;
// string decoder(int n,string s){
// 	string temp;
// 	int index=(n-1)/2;
// temp.append(1,s[index]);

// if(n%2==0){
// for(int i=1;i<=n-1;i++){

// 	index+=pow(-1,i+1)*i;
// 	temp.append(1,s[index]);
// }

// }
// else {
// 	for(int i=1;i<=n-1;i++){
// 		index+=pow(-1,i)*i;
// 	temp.append(1,s[index]);
// 	}
// }
// return temp;

// }
// int main(){

// int n;
// string s;

// cin>>n>>s;
// if(n==1 || n==2){cout<<s;exit(0);}

// cout<<decoder(n,decoder(n,s));

// }
#include<bits/stdc++.h>
using namespace std;
map <int ,int> m;
int main(){
int n;
string s;
cin>>n>>s;

if(n==0 || n==1){cout<<s;exit(0);}
int index=(n-1)/2;
m[index]=0;
if(n%2==0){
for(int i=1;i<=n-1;i++){
	index+=pow(-1,i+1)*i;
	m[index]=i;
}
}
else{
for(int i=1;i<=n-1;i++){
	index+=pow(-1,i)*i;
	m[index]=i;
}
}
for(int i=0;i<n;i++){
	cout<<s[m[i]];
}

}


#include<bits/stdc++.h>
using namespace std;
int main(){

int n;
string s;

cin>>n>>s;
if(n==1 || n==2){cout<<s;exit(0);}

int index=(n-1)/2;
cout<<s[index];
if(n%2==0)
for(int i=1;i<=n-1;i++){

	index+=pow(-1,i+1)*i;
	cout<<s[index];
}
else {
	for(int i=1;i<=n-1;i++){
		index+=pow(-1,i)*i;
		cout<<s[index];
	}
}

}


#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<algorithm>
#include<string.h>
#include<string>
#include<queue>
using namespace std;
int main()
{
    char str[3000],s[3000];
    int n,k=0,t;
    cin>>n;
    for(int i=0; i<n; i++)
        cin>>str[i];
    k=n;

    if(n<=2)
    {
        for(int j=0; j<n; j++)
            cout<<str[j];
        cout<<endl;
    }
    else
    {
        int i=1;
        s[n/2]=str[0];
        t=n/2;
        n=n/2;
        while(i<k)
        {
            if(i%2==0)
                s[++t]=str[i];
            else
                s[--n]=str[i];
            i++;
        }
        for(i=0; i<k; i++)
            cout<<s[i];
        cout<<endl;
    }

    return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<algorithm>
#include<string.h>
#include<string>
#include<queue>
using namespace std;
int main()
{
    char str[3000],s[3000];
    int n,k=0,t;
    cin>>n;
    for(int i=0; i<n; i++)
        cin>>str[i];
    k=n;
    if(n%2==0)
    {
        s[n/2-1]=str[0];
        t=n/2-1;
        n=n/2-1;
        int i=1;
        while(i<k)
        {
            if(i%2!=0)
                s[++t]=str[i];
            else
                s[--n]=str[i];
            i++;
        }
    }
    else
    {
        s[n/2]=str[0];
        t=n/2;
        n=n/2;
        int i=1;
        while(i<k)
        {
            if(i%2==0)
                s[++t]=str[i];
            else
                s[--n]=str[i];
            i++;
        }
    }
    for(int i=0; i<k; i++)
        cout<<s[i];
    cout<<endl;
    return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<algorithm>
#include<string.h>
#include<string>
#include<queue>
using namespace std;
int main()
{
    char str[3000],s[3000];
    int n,k=0;
    cin>>n;
    for(int i=0; i<n; i++)
        cin>>str[i];
    while(n!=0)
    {
        if(n%2==0)
        {
            s[k++]=str[n/2-1];
            for(int i=n/2-1; i<n-1; i++)
                str[i]=str[i+1];
        }
        else
        {
            s[k++]=str[n/2];
            for(int i=n/2; i<n-1; i++)
                str[i]=str[i+1];
        }
        n--;
    }
    for(int i=0; i<k; i++)
        cout<<s[i];
    cout<<endl;
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include<string.h>

using namespace std;
int main()
{
    int n,m;
    string s,s1="",s2="";
    cin>>n>>s;
    if(n%2==1)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n;i+=2)
        {
            s1=s1+s[i];
            s1=s[i+1]+s1;
        }
    }
    else if(n%2==0)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n-1;i+=2)
        {
            s1=s1+s[i];
            s1=s[i+1]+s1;
        }
        s1+=s[n-1];
    }
    cout<<s1<<endl;;
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include<string.h>

using namespace std;
int main()
{
    int n,m;
    string s,s1="",s2="";
    cin>>n>>s;
    if(n%2==1)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n-1;i+=2)
        {
            s1=s[i]+s1;
            s1=s1+s[i+1];
        }
    }
    else if(n%2==0)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n-1;i+=2)
        {
            s1=s[i]+s1;
            s1=s1+s[i+1];
        }
        s1+=s[n-1];
    }
    cout<<s1<<endl;;
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include<string.h>

using namespace std;
int main()
{
    int n,m;
    string s,s1="",s2="";
    cin>>n>>s;
    if(n%2==1)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n;i+=2)
        {
            s1=s1+s[i+1];
            s1=s[i]+s1;
        }
    }
    else if(n%2==0)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n-1;i+=2)
        {
            s1=s1+s[i+1];
            s1=s[i]+s1;
        }
        s1+=s[n-1];
    }
    cout<<s1<<endl;;
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include<string.h>

using namespace std;
int main()
{
    int n,m;
    string s,s1="",s2="";
    cin>>n>>s;
    if(n%2==1)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n;i+=2)
        {
            s1=s[i]+s1;
            s1=s1+s[i+1];
        }
    }
    else if(n%2==0)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n-1;i+=2)
        {
            s1=s[i+1]+s1;
            s1=s1+s[i];
        }
        s1+=s[n-1];
    }
    cout<<s1<<endl;;
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include<string.h>

using namespace std;
int main()
{
    int n,m;
    string s,s1="",s2="";
    cin>>n>>s;
    if(n%2==1)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n;i+=2)
        {
            s1=s[i]+s1;
            s1=s1+s[i+1];
        }
    }
    else if(n%2==0)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n-1;i+=2)
        {
            s1=s[i]+s1;
            s1=s1+s[i+1];
        }
        s1+=s[n-1];
    }
    cout<<s1<<endl;;
    return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include<string.h>

using namespace std;
int main()
{
    int n,m;
    string s,s1="",s2="";
    cin>>n>>s;
    if(n%2==1)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n;i+=2)
        {
            s1=s[i]+s1;
            s1=s1+s[i+1];
        }
    }
    else if(n%2==0)
    {
        int i,j;
        int m=n/2;
        s1+=s[0];
        for(i=1;i<n;i+=2)
        {
            s1=s[i+1]+s1;
            s1=s1+s[i];
        }
    }
    cout<<s1<<endl;;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long i,n,t,ans,x,y,z,l,mid;
	cin>>l;
	string s;
	cin>>s;

	n=l;
	while(n)
	{
		if((n%2)==0)
		{
			mid=(n/2)-1;
		}
		else
		{
			mid=n/2;
		}
		//cout<<mid<<endl;
		cout<<s[mid];
		s.erase(mid,1);
		//cout<<s<<endl;
		n--;
	}
return(0);
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long i,n,t,ans,x,y,z,l,mid;
	cin>>l;
	string s;
	cin>>s;

	n=l;
	while(n)
	{
		if((n%2)==0)
		{
			mid=(n/2)-1;
		}
		else
		{
			mid=n/2;
		}
		//cout<<mid<<endl;
		cout<<s[mid];
		s.erase(mid,1);
		//cout<<s<<endl;
		n--;
	}
	cout<<endl;
return(0);
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long i,n,t,ans,x,y,z,l,mid;
	cin>>n;
	string s,st;
	cin>>s;
	st=s[0];
	i=1;
	if(n%2!=0)
	{
		while(i<n)
		{
			if(i%2==0)
			{
				st+=s[i];
			}
			else
			{
				st=s[i]+st;
			}
			i++;
		}
	}
	else
	{
		st+=s[i];
		i++;
		while(i<n)
		{
			if(i%2==0)
			{
				st=s[i]+st;
			}
			else
			{
				st+=s[i];
			}
			i++;
		}
	}
	cout<<st<<endl;
return(0);
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<string>
#include<climits>
#include<vector>
#include<cmath>
#define LL long long
#define D double

using namespace std;

inline char nc(){
  static char buf[100000],*p1=buf,*p2=buf;
  if (p1==p2) { p2=(p1=buf)+fread(buf,1,100000,stdin); if (p1==p2) return EOF; }
  return *p1++;
}

inline void read(int &x){
  char c=nc(),b=1;
  for (;!(c>='0' && c<='9');c=nc()) if (c=='-') b=-1;
  for (x=0;c>='0' && c<='9';x=x*10+c-'0',c=nc()); x*=b;
}

inline void read(LL &x){
  char c=nc(),b=1;
  for (;!(c>='0' && c<='9');c=nc()) if (c=='-') b=-1;
  for (x=0;c>='0' && c<='9';x=x*10+c-'0',c=nc()); x*=b;
}

int wt,ss[19];
inline void print(int x){
	if (x<0) x=-x,putchar('-');
	if (!x) putchar(48); else {for (wt=0;x;ss[++wt]=x%10,x/=10);for (;wt;putchar(ss[wt]+48),wt--);}
}
inline void print(LL x){
	if (x<0) x=-x,putchar('-');
	if (!x) putchar(48); else {for (wt=0;x;ss[++wt]=x%10,x/=10);for (;wt;putchar(ss[wt]+48),wt--);}
}

int n,m,k,a[200010],c[2],d[200010],f[2][200010];

int main()
{
	read(n);read(m);read(k);
	for (int i=1;i<=m;i++)
		read(a[i]);
	int BC=0,CF=0;
	for (int i=1;i<m;i++)
		if (a[i]>a[i+1]) BC+=a[i]-a[i+1],d[i]=a[i]-a[i+1];else d[i]=0;
	BC+=a[m];CF+=a[m];d[m]=a[m];
	for (int i=1;i<m;i++) CF+=a[i]-1;
	if (k<BC||CF<k) {printf("-1\n");return 0;}
	print(n);putchar('\n');
	for (int i=1;i<m;i++)
	{
		if (BC==k) break;
		int res=a[i]-1-d[i];
		if (k>BC+res) BC+=res,d[i]=a[i]-1;
		else d[i]+=k-BC,BC=k;
	}
	int X=1,Y=1,Z=0;
	for (int i=1;i<=a[m];i++) f[0][++c[0]]=++Y;
	for (int i=m-1;i;i--,swap(X,Z))
	{
		c[X]=0;
		for (int j=1;j<=a[i];j++) f[X][++c[X]]=++Y;
		int pos=1,g=a[i]-d[i];
		for (int j=1;j<=c[Z];j++)
			printf("%d %d\n",f[X][pos],f[Z][j]),pos=pos==g?1:pos+1;
	}
	for (int i=1;i<=c[Z];i++)
		printf("1 "),print(f[Z][i]),putchar('\n');
	return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<string>
#include<climits>
#include<vector>
#include<cmath>
#define LL long long
#define D double

using namespace std;

inline char nc(){
  static char buf[100000],*p1=buf,*p2=buf;
  if (p1==p2) { p2=(p1=buf)+fread(buf,1,100000,stdin); if (p1==p2) return EOF; }
  return *p1++;
}

inline void read(int &x){
  char c=nc(),b=1;
  for (;!(c>='0' && c<='9');c=nc()) if (c=='-') b=-1;
  for (x=0;c>='0' && c<='9';x=x*10+c-'0',c=nc()); x*=b;
}

inline void read(LL &x){
  char c=nc(),b=1;
  for (;!(c>='0' && c<='9');c=nc()) if (c=='-') b=-1;
  for (x=0;c>='0' && c<='9';x=x*10+c-'0',c=nc()); x*=b;
}

int wt,ss[19];
inline void print(int x){
	if (x<0) x=-x,putchar('-');
	if (!x) putchar(48); else {for (wt=0;x;ss[++wt]=x%10,x/=10);for (;wt;putchar(ss[wt]+48),wt--);}
}
inline void print(LL x){
	if (x<0) x=-x,putchar('-');
	if (!x) putchar(48); else {for (wt=0;x;ss[++wt]=x%10,x/=10);for (;wt;putchar(ss[wt]+48),wt--);}
}

int n,m;
char a[2010];

int main()
{
	cin>>n;
	char c[2010];
	cin>>c+1;
	for (int i=1;i<=n;i++)
	{
		int s=0;
		for (int j=1;j<=((n-i+1)+1)/2;j++)
		{s++;while (a[s]!=0) s++;}a[s]=c[i];
	}
	for (int i=1;i<=n;i++)
		putchar(a[i]);
	putchar('\n');
	return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<string>
#include<climits>
#include<vector>
#include<cmath>
#define LL long long
#define D double

using namespace std;

inline char nc(){
  /*static char buf[100000],*p1=buf,*p2=buf;
  if (p1==p2) { p2=(p1=buf)+fread(buf,1,100000,stdin); if (p1==p2) return EOF; }
  return *p1++;*/getchar();
}

inline void read(int &x){
  char c=nc(),b=1;
  for (;!(c>='0' && c<='9');c=nc()) if (c=='-') b=-1;
  for (x=0;c>='0' && c<='9';x=x*10+c-'0',c=nc()); x*=b;
}

inline void read(LL &x){
  char c=nc(),b=1;
  for (;!(c>='0' && c<='9');c=nc()) if (c=='-') b=-1;
  for (x=0;c>='0' && c<='9';x=x*10+c-'0',c=nc()); x*=b;
}

int wt,ss[19];
inline void print(int x){
	if (x<0) x=-x,putchar('-');
	if (!x) putchar(48); else {for (wt=0;x;ss[++wt]=x%10,x/=10);for (;wt;putchar(ss[wt]+48),wt--);}
}
inline void print(LL x){
	if (x<0) x=-x,putchar('-');
	if (!x) putchar(48); else {for (wt=0;x;ss[++wt]=x%10,x/=10);for (;wt;putchar(ss[wt]+48),wt--);}
}

int n,m,k,a[200010],c[2],d[200010],f[2][200010];

int main()
{
	read(n);read(m);read(k);
	for (int i=1;i<=m;i++)
		read(a[i]);
	int BC=0,CF=0;
	for (int i=1;i<m;i++)
		if (a[i]>a[i+1]) BC+=a[i]-a[i+1],d[i]=a[i]-a[i+1];else d[i]=0;
	BC+=a[m];CF+=a[m];d[m]=a[m];
	for (int i=1;i<m;i++) CF+=a[i]-1;
	if (k<BC||CF<k) {printf("-1\n");return 0;}
	print(n);putchar('\n');
	for (int i=1;i<m;i++)
	{
		if (BC==k) break;
		int res=a[i]-1-d[i];
		if (k>BC+res) BC+=res,d[i]=a[i]-1;
		else d[i]+=k-BC,BC=k;
	}
	int X=1,Y=1,Z=0;
	for (int i=1;i<=a[m];i++) f[0][++c[0]]=++Y;
	for (int i=m-1;i;i--,swap(X,Z))
	{
		c[X]=0;
		for (int j=1;j<=a[i];j++) f[X][++c[X]]=++Y;
		int pos=1,g=a[i]-d[i];
		for (int j=1;j<=c[Z];j++)
			printf("%d %d\n",f[X][pos],f[Z][j]),pos=pos==g?1:pos+1;
	}
	for (int i=1;i<=c[Z];i++)
		printf("1 "),print(f[Z][i]),putchar('\n');
	return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<queue>
#include<cmath>
using namespace std;

int main()
{
    int i,j,k;
    char str[2005],res[2005];
    memset(res,'\0',sizeof(res));
    int n;
    cin>>n;
    cin >>str;
    j = 0;
    k = n-1;
    for(i = n-1; i >= 0; i-=2)
    {
        if(i-1>=0)
            res[j] = str[i-1];
        res[k] = str[i];
        j++;
        k--;
    }
    if(n < 3)
    {
        cout <<str;
    }
    else
        cout << res;
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<queue>
#include<cmath>
using namespace std;

int main()
{
    int i,j,k;
    char str[2005],res[2005];
    int n;
    cin>>n;
    cin>>str;
    j = 0;
    k = n-1;
    for(i = n-1; i >= 0; i-=2)
    {
        if(i-1>=0)
        res[j] = str[i-1];
        res[k] = str[i];
        j++;
        k--;
    }
    if(n < 3)
    {
        cout <<str<<endl;
    }else
        cout << res<<endl;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<queue>
#include<cmath>
using namespace std;

int main()
{
    int i,j,k;
    char str[2005],res[2005];
    int n;
    cin>>n;
    getchar();
    gets(str);
    j = 0;
    k = n-1;
    for(i = n-1; i >= 0; i-=2)
    {
        if(i-1>=0)
            res[j] = str[i-1];
        res[k] = str[i];
        j++;
        k--;
    }
    if(n < 3)
    {
        cout <<str<<endl;
    }
    else
        cout << res<<endl;
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<queue>
#include<cmath>
using namespace std;

int main()
{
    int i,j,k;
    char str[2005],res[2005];
    int n;
    cin>>n;
    cin>>str;
    j = 0;
    k = n-1;
    for(i = n-1; i >= 0; i-=2)
    {
        res[j] = str[i-1];
        res[k] = str[i];
        j++;
        k--;
    }
    if(n < 3)
    {
        cout <<str<<endl;
    }else
//    else if(n%2 == 0)
//    {
        cout << res<<endl;
//    }
//    else if(n%2 != 0)
//    {
//        res[j] = str[0];
//        cout <<res<<endl;
//    }
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<queue>
#include<cmath>
using namespace std;

int main()
{
    int i,j,k;
    char str[2005],res[2005];
    int n;
    cin>>n;
    cin >>str;
    j = 0;
    k = n-1;
    for(i = n-1; i >= 0; i-=2)
    {
        if(i-1>=0)
            res[j] = str[i-1];
        res[k] = str[i];
        j++;
        k--;
    }
    if(n < 3)
    {
        cout <<str;
    }
    else
        cout << res;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define eps 1e-9
#define con continue
#define bk break
#define LL long long
#define db double
#define pt cout<<'\n'
#define ms(a, b) memset((a), (b), sizeof(a))
#define mp make_pair
#define endl '\n'
int inf=2147483647;const long long ll =9223372036854775807;
#define sz size()
#define len(X) strlen(X)
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define ac fstream cin("input.txt");ofstream cout("output.txt");
#define ULL unsigned long long
int main()
{
    int a;
    while(cin>>a){
    vector<char>ans1,ans2;
    string x;
    cin>>x;
    int flag=0;
    for(int i=x.sz-1;i>=0;i--){
        if(!flag){
                flag=1;
                ans2.insert(ans2.begin(),x[i]);
    }
        else{
            flag=0;
            ans1.push_back(x[i]);
        }
    }
    for(int i=0;i<ans1.sz;i++)
            cout<<ans1[i];
    for(int i=0;i<ans2.sz;i++)
        cout<<ans2[i];
    pt;

    }
return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define eps 1e-9
#define con continue
#define bk break
#define LL long long
#define db double
#define pt cout<<'\n'
#define ms(a, b) memset((a), (b), sizeof(a))
#define mp make_pair
#define endl '\n'
int inf=2147483647;const long long ll =9223372036854775807;
#define sz size()
#define len(X) strlen(X)
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define ac fstream cin("input.txt");ofstream cout("output.txt");
#define ULL unsigned long long
int main()
{
    int a,b,c;
    while(cin>>a){
    vector<char>ans1,ans2;
    string x;
    cin>>x;
    int flag=0;
    for(int i=x.sz-1;i>=0;i--){
        if(!flag){
                flag=1;
                ans2.insert(ans2.begin(),x[i]);
    }
        else{
            flag=0;
            ans1.push_back(x[i]);
        }
    }
    for(int i=0;i<ans1.sz;i++)
            cout<<ans1[i];
    for(int i=0;i<ans2.sz;i++)
        cout<<ans2[i];
    pt;

    }
return 0;
}