#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int mxn= 2e6+6;
// check for forloop
// intialize variable
// overflow
// go for easy solution
#define mod 1000000007
ll INF = 1000000000000000005LL;
#define endl '\n'
void rishabh(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
}
ll factor[1000005];

void calc_factors(){
	for(ll i=2;i<1000005;i++)factor[i]=i;
	factor[0]=0;factor[1]=1;
	for(ll i=4;i<1000005;i=i+2)factor[i]=2;
	for(ll i=3;i*i<1000005;i++){
		if(factor[i]==i){
			for(ll j=i*i;j<1000005;j=j+i)
			{
				if(factor[j]==j)
				factor[j]=i;
			}
		}
	}
}

int main(){
    rishabh();
    calc_factors();
    ll n;
    cin>>n;
    ll arr[n];
    map<ll,ll> mp;
    ll ans=0;
    for(ll i=0;i<n;i++){
        cin>>arr[i];
        set<ll> s;
        ll fac=factor[arr[i]];
        s.insert(fac);
        while(fac!=factor[fac]){
            fac=factor[fac];
            s.insert(fac);
        }
        for(auto x: s){
            mp[x]++;
        }
        ans=__gcd(arr[i],ans);
    }
    bool f=true;
    for(auto x: mp){
        if(x.second>1&&x.first!=1&&x.first!=0){
            f=false;
            break;
        }
    }
    if(f){
        cout<<"pairwise coprime";
    }
    else    if(ans==1){
            cout<<"setwise coprime";
        }
    else cout<<"not coprime";
}