#include <bits/stdc++.h>
#define boost_io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define int long long
#define num(a) a-'0'
#define charr(a) (a - 'A' + 1)
#define rep(i,a,b) for(int i=a;i<b;i++)
#define maxs(a,b) if(b>a)a=b
#define mins(a,b) if(b<a)a=b
#define debug(x) cerr<<"["<<#x<<":"<<x<<"] "
#define debug2(a,b) debug(a);debug(b)
#define debug3(a,b,c) debug2(a,b);debug(c)
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*b)/(__gcd(a,b))
#define print(arr) for(auto it = arr.begin();it < arr.end();it ++){cout << *it << " ";}cout << ln;
#define all(a) (a).begin(), (a).end()
#define vi vector<long long>
#define v vector
#define p pair
#define pb push_back
#define mk make_pair
#define f first
#define s second
#define ln "\n"
typedef long double ld;
typedef double d;
using namespace std;
int modF=1e9+7;
int INF=1e11;

vi primes(1e3+1,1);
vi pv;
vi h(1e6+1,0);

void solve(){
    for(int i=2;i*i<=1e3;i++){
        if(primes[i]==1){
            for(int j=i*i;j*j<1e3;j+=i){
                primes[j]=0;
            }
        }
    }
    rep(i,2,1e3+1){
        if(primes[i])
            pv.pb(i);
    }
    int n;
    cin>>n;
    vi a(n);
    cin>>a[0];
    int g=a[0];
    rep(i,1,n){
        cin>>a[i];
        g=gcd(g,a[i]);
    }
    if(g!=1){
        cout<<"not coprime"<<ln;
    }
    else{
        int pos=true;

        if(n>=1e5){
            pos=false;
        }
        else{
            rep(k,0,n){
                int c=a[k];
                for(int i:pv){
                    if(i*i<=a[k]){
                        if(c%i==0){
                            if(h[i]){
                                cout<<"setwise coprime\n";
                                return;
                            }
                            else{
                                h[i]++;
                            }
                        }
                        while(c%i==0){
                            c/=i;
                        }
                    }
                    else{
                        break;
                    }
                }
                 if(c>1){
                    if(h[c]){
                        cout<<"setwise coprime\n";
                        return;
                    }
                    else{
                        h[c]++;
                    }
                }
            }
        }

        if(pos){
            cout<<"pairwise coprime"<<ln;
        }
        else{
            cout<<"setwise coprime"<<ln;
        }
    }
}

signed main(){
	boost_io;
	solve();
	return 0;
}
