#include "bits/stdc++.h" 
using namespace std; 
  
#define MAXN   1000001 
  
// stores smallest prime factor for every number 
ll spf[MAXN]; 
  
// Calculating SPF (Smallest Prime Factor) for every 
// number till MAXN. 
// Time Complexity : O(nloglogn) 
void sieve() 
{ 
    spf[1] = 1; 
    for (ll i=2; i<MAXN; i++) 
  
        // marking smallest prime factor for every 
        // number to be itself. 
        spf[i] = i; 
  
    // separately marking spf for every even 
    // number as 2 
    for (ll i=4; i<MAXN; i+=2) 
        spf[i] = 2; 
  
    for (ll i=3; i*i<MAXN; i++) 
    { 
        // checking if i is prime 
        if (spf[i] == i) 
        { 
            // marking SPF for all numbers divisible by i 
            for (ll j=i*i; j<MAXN; j+=i) 
  
                // marking spf[j] if it is not  
                // previously marked 
                if (spf[j]==j) 
                    spf[j] = i; 
        } 
    } 
} 
  
// A O(log n) function returning primefactorization 
// by dividing by smallest prime factor at every step 

  
// driver program for above function 
int main() 
{ 
    // precalculating Smallest Prime Factor 
    sieve(); 
    ll f[1000001];
    memset(f, 0,sizeof(f));
    ll n;
    cin>>n;
    ll m=n;
    
    while(m--){
        ll x;
        cin>>x;
        map<ll, bool> check;
        while (x != 1) 
        { 
            // cout<<spf[x]<<' ';
            
            if(!check[spf[x]]){
                f[spf[x]]++; 
                check[spf[x]]=1;
            }
            x = x / spf[x];
            
        }
        // cout<<'\n';
    }
    
    
    
    bool f1=1, f2=1;
    
    for(ll i=0;i<10;i++){
        //  cout<<f[i]<<' ';
        if(f[i]>1)
            f1=0;
            
        if(f[i]>=n)
            f2=0;
        
    }
    // cout<<f[3]<<'\n';
    // cout<<f1<<' '<<f2<<'\n';
    // cout<<'\n';
    if(!f1 && f2)
        cout<<"setwise coprime";
    
    else if(f1)
        cout<<"pairwise coprime";
    
    else cout<<"not coprime";
    
    
} 