#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fr(i,k,n) for(ll i = k;i<n;i++)
#define mo map<ll,ll> 
int main(){
	 ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n;
    cin>>n;
    ll arr[n+2];
    fr(i,0,n){
    	cin>>arr[i];
    }
    ll ans = arr[0];
    fr(i,1,n){
    	ans = __gcd(ans,arr[i]);
    }
    set<ll> sf;
    unordered_map<ll,set<ll>> ms;
    fr(i,0,n){
    	ll c = arr[i];
    	ll flg = 0;
    	while(c%2 == 0 && c != 1){
    		flg = 1;
    		c /= 2;
    		sf.insert(2);
    	}
    	if(flg == 1){
    		ms[2].insert(i);
    	}
    	for(ll j = 3;j*j<=(arr[i]+2);j++){
    		flg = 0;
    		while(c%j == 0 && c>=j){
    			c /= j;
    			flg = 1;
    		}
    		if(flg == 1){
    			ms[j].insert(i);
    			sf.insert(j);
    		}
    		if(c<j){
    			break;
    		}
    	}
    	if(c>1){
    		ms[c].insert(i);
    	}
    	
    }
    ll fu = 0;
    	for(auto it = sf.begin();it != sf.end();it++){
    		if(ms[*it].size()>1){
    			fu = 1;
    		}
    	}
    	if(fu == 0 && ans == 1){
    		cout<<"pairwise coprime"<<"\n";
    	}
    	else if(fu == 1 && ans == 1){
    		cout<<"setwise coprime"<<"\n";
    	}
    	else{
    		cout<<"not coprime"<<"\n";
    	}
   
}