#include <bits/stdc++.h>
using namespace std;
 
#define IOS ios :: sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define ll long long
#define endl '\n'
#define inf 9223372036854775807
#define maxn 1000001
#define mod (ll)(1e9+7)
#define int ll
 
using namespace std;
 
void io(){
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
}

int n,m,ar[maxn];
bool isprime[maxn];


void __solve(){
		cin>>n;
		for(int i=0;i<n;i++)cin>>ar[i];

		isprime[1]=1;
		for(int i=2;i*i<=maxn;i++){
			if(isprime[i]==0){
				for(int j=i*i;j<=maxn;j+=i){
					isprime[j]=1;
				}
			}
		}

		vector<int> primes;
		primes.push_back(2);
		for(int i=3;i<=maxn;i+=2){
			if(isprime[i]==0){
				primes.push_back(i);
			}
		}

		// cout<<primes.size()<<endl;

		int cntmx=0;
		for(int i=0;i<(int)primes.size();i++){
			int cnt=0;
			for(int j=0;j<n;j++){
				if(ar[j]%primes[i]==0)cnt++;
				if(cnt==2)break;
			}
			cntmx=max(cntmx,cnt);
			if(cntmx==2)break;
		}

		// cout<<cntmx<<endl;

		int curgcd=ar[0];
		for(int i=1;i<n;i++){
			curgcd=__gcd(curgcd,ar[i]);
		}
		if(cntmx==1){
			cout<<"pairwise coprime"<<endl;
		}else if(curgcd==1){
			cout<<"setwise coprime"<<endl;
		}else{
			cout<<"not coprime"<<endl;
		}
		
}


int32_t main(){
// io();
IOS;    
			int t=1;
			// cin>>t;
			while(t--){
				__solve();
			}
		
		



        

        


        
    
        
        
                


 
        
 
 
 
        
 
 
 
 
        
        
 
        
        
 
    
    
    
    
 
 
       
 
 
 
 
      
   
 
 
 
 
}