#include<bits/stdc++.h>
#include<cmath>
#define pb push_back
#define ld long double
#define mp make_pair
#define vl vector<ll> 
#define vd vector<double>
#define vld vector<long double>
#define ll long long int
#define pl pair<ll, ll>
#define all(a) a.begin(), a.end()
#define forr(i, n) for(ll i=0; i<n; i++) 
#define forr1(i, n) for(ll i=1; i<=n; i++)
using namespace std;
const ld PI =3.1415926535897923846;
const ll MOD = 1000000007;
const ll N=998244353;
ll power(ll x,ll n){ll res=1;while(n>0){if(n&1) res=res*x%MOD;x=x*x%MOD;n>>=1;}return res;}
ll modinverse(ll a){return power(a, MOD-2);}
ll n;
vl a;
void solve()
{
    cin>>n;
    a.resize(n);
    forr(i, n)
    {
    	cin>>a[i];
    }
    ll gcd=__gcd(a[0], a[1]);
    for(ll i=2; i<n; i++)
    	gcd=__gcd(gcd, a[i]);
    map<ll, ll> mp1;
    bool check=true;
    for(ll i=0; i<n; i++)
    {
    	// break a[i] down
    	for(ll j=2; j<=(ll)sqrt(a[i]); j++)
    	{
    		if(a[i]%j==0)
    		{
    			if(mp1.find(j)!=mp1.end())
    			{
    				check=false;
    				break;
    			}
    			mp1[j]++;
    			while(a[i]%j==0)
    				a[i]/=j;
    		}
    	}
    	if(!check)
    		break;
    }
    if(check==false)
    {
    	if(gcd==1)
    		cout<<"setwise coprime\n";
    	else
    		cout<<"not coprime\n";
    	return;
    }
    else
    {
    	cout<<"pairwise coprime\n";
    	return;
    }
}
int main()
{
	#ifndef ONLINE_JUDGE
        // for getting input from input.txt
        freopen("input.txt", "r", stdin);
        // for writing output to output.txt
        freopen("output.txt", "w", stdout);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll test=1;
    //cin>>test;
    while(test--)
    {
        solve();
    }
    cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}