#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL)
typedef long long ll;
typedef long double ld;
#define trace(x)  cerr << #x << ": " << x << endl;
const ll N=1e6+5;ll mod=998244353;
const ll NN=1e6+5; 

ll spf[N];ll ans[NN]={0};ll h[N]={0};

void sieve() 
{ 
    spf[1] = 1; 
    for (ll i=2; i<N; i++) 
        {spf[i] = i;ans[i]=h[i];}
    for (ll i=4; i<N; i+=2) 
        {spf[i] = 2;ans[2]+=h[i];} 

    for (ll i=3; i<N; i++) 
    { 
        if (spf[i] == i) 
        { 
            for (ll j=i*i; j<N; j+=i){ 
                if (spf[j]==j) 
                    {spf[j] = i;}ans[i]+=h[j];}
        } 
    }
    //for(ll i=0;i<N;i++)trace(spf[i]);
    return;
} 
int main()
{
	fast;
	ll n;cin>>n;ll g=0;std::vector<ll> a(n);
	for(ll i=0;i<n;i++)
	{
		cin>>a[i];g=__gcd(a[i],g);h[a[i]]++;
	}
	if(g!=1)
	{
		cout<<"not coprime";return 0;
	}
	sieve();//cout<<"returned";
	ll f=1;
	for(ll i=2;i<NN;i++)if(ans[i]>1){f=0;break;}
	//trace(k);
	if(f)cout<<"pairwise coprime";
	else cout<<"setwise coprime";

}