#include<bits/stdc++.h>
using namespace std;
typedef  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];
   
//ll ms[c];
map<ll,ll> ms;
   /*   fr(i,0,1e6+1){
    	ms[i] = 0;
    }*/
    //set<ll> sd;
   fr(i,0,n){
    	cin>>arr[i];
    //	sd.insert(arr[i]);
    //	ms[arr[i]]++;
    }
 
    ll ans = arr[0];
    fr(i,1,n){
    	ans = __gcd(ans,arr[i]);
    }
 if(ans >1){
 	cout<<"not coprime"<<"\n";
 }
 else{
 	ll au = 0;
 //	cout<<ms[3]<<"\n";
 	fr(i,0,n){
 		ll c = arr[i];
 		
 		fr(j,2,sqrt(arr[i])){
 			if(c%j == 0){
 				
 				ms[j]++;
 			}
 			while(c%j == 0){
 				c /= j;
 			}
 		
 			
 			if(ms[j]>1){
 		//		cout<<j<<"\n";
 				au = 1;
 				break;
 			}
 			
 		}
 		//cout<<ms[3]<<" "<<i<<"\n";
 		if(c>1){
 			ms[c]++;
 		//	cout<<ms[3]<<"\n";
 		}
 		if(ms[c]>1){
 			
 			//cout<<c<<"\n";
 			au = 1;
 			break;
 		}
 	}
 	if(au == 0){
 		cout<<"pairwise coprime"<<"\n";
 	}
 	else{
 		cout<<"setwise coprime"<<"\n";
 	}
 	
 }
}