#include<bits/stdc++.h>
using namespace std;
#define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
typedef int ll;
typedef long double ld;
typedef pair<ll,ll> p2;
#define sz(a) ll(a.size())
ll cnt[1000005],ans[1000005],spf[1000005],hell=pow(10,6);
void solve(){
	ll n;
	cin>>n;
	for(ll i=0;i<n;i++){
		ll x;
		cin>>x;
		cnt[x]=1;
	}
	for(ll i=1;i<=hell;i++)
		if(cnt[i]){
			ll x=i;
			while(x>1){
				ll y=spf[x];
				while(x%y==0)
					x/=y;
				ans[y]++;
			}
		}
	ll f=0;
	for(ll i=1;i<=hell;i++)
		if(ans[i]>1)
			f=1;
	if(!f){
		cout<<"pairwise coprime";
		return;
	}
	f=0;
	for(ll i=1;i<=hell;i++)
		if(cnt[i])
			f=__gcd(f,i);
	if(f==1)
		cout<<"setwise coprime";
	else
		cout<<"not coprime";
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r" , stdin);
    freopen("output.txt", "w", stdout);
    #endif
    clock_t z=clock();
    spf[1]=1;
    for(ll i=2;i*i<=hell;i++)
    	if(!spf[i])
    		for(ll j=i*i;j<=hell;j+=i)
    			if(!spf[j])
    				spf[j]=i;
    for(ll i=2;i<=hell;i++)
    	if(!spf[i])
    		spf[i]=i;
    ll qc=1;
    //cin>>qc;
    for(ll i=1;i<=qc;i++)
        solve();
    debug("Total Time:%.4Lf\n",(ld)(clock()-z)/CLOCKS_PER_SEC);
}