#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define REP(i,n) for (int64_t i=0; i<(n); ++i)
#define P pair<int,int>
using ll=int64_t;
using namespace std;
#define ketasuu(n) fixed<<setprecision(n)
#define btoe(p) p.begin(),p.end()
#define etob(p) p.rbegin(),p.rend()




int main(){
    int n; cin>>n;
    vector<int> a(n);
    rep(i,n) cin>>a[i];
    vector<int> primes(1e6+5,1);   
    for(int i=2; i<1e6+5; ++i){
        for(int j=2; j*j<=i; ++j){
            if(i%j==0){
                primes[i]=j;
                break;
            }
        }
    }
    map<int,int> che;
    rep(i,n){
        int kari=a[i];
        while(primes[kari]!=1){
            che[primes[kari]]++;
            kari/=primes[kari];
        }
    }
    bool ok=true;
    for(auto &v: che){
        if(v.second>1){
            ok=false;
        }
    }
    if(ok){
        cout<<"pairwise coprime"<<endl;
        return 0;
    }
    int kari=a[0];
    rep(i,n-1){
        kari=gcd(kari,a[i+1]);
    }
    if(kari==1){
        cout<<"setwise coprime"<<endl;
        return 0;
    }
    cout<<"not coprime"<<endl;
    return 0;
}