#include<bits/stdc++.h>
#define ll long long
#define fs first
#define sec second
#define md 1000000007
#define pb push_back
#define mp make_pair
#define pll pair<ll,ll>
using namespace std;
ll power(ll x, unsigned ll y, ll p)  
{  
    ll res = 1;     // Initialize result  
  
    x = x % p; // Update x if it is more than or  
                // equal to p  
  
    while (y > 0)  
    {  
        // If y is odd, multiply x with result  
        if (y & 1)  
            res = (res*x) % p;  
  
        // y must be even now  
        y = y>>1; // y = y/2  
        x = (x*x) % p;  
    }  
    return res;  
}  

ll modInverse(ll n, ll p) 
{ 
    return power(n, p-2, p); 
}
int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll T=1;
    // cin>>T;
    while(T--){
    	ll n;
        cin>>n;
        vector<ll> v(n);
        ll x=v[0];
        for(ll i=0;i<n;i++){
            cin>>v[i];
            x=__gcd(x,v[i]);
        }
        sort(v.begin(),v.end());
        vector<ll> c(v[n-1]+1,0);
        ll f=0;
        for(ll i=0;i<n;i++){
            for(ll j=2;j*j<=v[i];j++){
                if(v[i]%j==0){
                    ll t=v[i]/j;
                    c[j]++;
                    if(t!=j) c[t]++;
                    if(c[j]==2 || c[t]==2){
                        f=1;
                        break;
                    }
                }
            }
            c[v[i]]++;
            if(c[v[i]]>=2) {
                f=1;
                break;
            }
            if(f) break;
        }
        if(!f){
            cout<<"pairwise coprime\n";
        }
        else if(x==1){
            cout<<"setwise coprime\n";
        }
        else cout<<"not coprime\n";
    }
    return 0;
}