#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
#define reps(i,s,n) for(int i=(s); i<(n); i++)
#define all(v) v.begin(),v.end()
#define outve(v) for(auto i : v) cout << i << " ";cout << endl
#define outmat(v) for(auto i : v){for(auto j : i) cout << j << " ";cout << endl;}
#define in(n,v) for(int i=0; i<(n); i++){cin >> v[i];}
#define out(n) cout << (n) << endl
#define fi first
#define se second
#define pb push_back
#define si(v) int(v.size())
#define len(v) int(v.length())
#define lob(v,n) lower_bound(all(v),n)
#define lobi(v,n) lower_bound(all(v),n) - v.begin()
#define upb(v,n) upper_bound(all(v),n)
#define upbi(v,n) upper_bound(all(v),n) - v.begin()
#define mod 1000000007
#define infi 1900000000
#define infl 1100000000000000000
#define cyes cout << "Yes" << endl
#define cno cout << "No" << endl
#define csp << " " <<
#define outset(n) cout << fixed << setprecision(n);
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vs = vector<string>;
using vc = vector<char>;
using vd = vector<double>;
using vvd = vector<vector<double>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vvp = vector<vector<pair<int,int>>>;
template<typename T> using ve = vector<T>;
template<typename T> using pq2 = priority_queue<T>;
template<typename T> using pq1 = priority_queue<T,vector<T>,greater<T>>;
template<typename T> bool chmax(T &a, T b) {if(a < b) {a = b;return 1;}return 0;}
template<typename T> bool chmin(T &a, T b) {if(a > b) {a = b;return 1;}return 0;}

template <typename T> T gcd(T a, T b) {if(b == 0) return a;return gcd(b,a%b);}


struct prime {
    vector<int> f,prime_list;
    prime(int n=1):f(n+1){
        f[0] = f[1] = -1;
        for (ll i = 2; i <= n; ++i){
            if(f[i]) continue;
            f[i] = i;
            prime_list.pb(i);
            for (ll j = i*i; j <= n; j+=i){
                if(!f[j]) f[j] = i;
            }
        }
    }
    
    bool is_prime(int a){return f[a] == a;}
    
    vector<int> ve_prime(int a){
        vector<int> res;
        while (a != 1) {
            res.pb(f[a]);
            a /= f[a];
        }
        return res;
    }
    
    vector<pair<int,int>> num_prime(int a){
        vector<int> flist = ve_prime(a);
        if(flist.size() == 0) return {};
        vector<pii> res(1,{flist[0],0});
        for(int p : flist){
            if(res.back().fi == p) res.back().se++;
            else res.pb({p,1});
        }
        return res;
    }
    
};

int main(){
    
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int N;
    cin >> N;
    vi A(N);
    in(N,A);
    
    prime P(1000010);
    
    map<int,int> M;
    int ans = 0;
    
    rep(i,N){
        ve<pii> aa = P.num_prime(A[i]);
        rep(j,si(aa)) M[aa[j].fi] += aa[j].se;
    }
        
    
    rep(i,N){
        if(ans != 0) break;
        ve<pii> aa = P.num_prime(A[i]);
        rep(j,si(aa)){
            if(M[aa[j].fi] != aa[j].se) {
                ans = 1;
                break;
            }
        }
        
    }
    
    
    if(ans == 0){
        cout << "pairwise coprime" << endl;
    }else{
        int bb = A[0];
        reps(i,1,N) bb = gcd(bb,A[i]);
        if(bb == 1){
            cout << "setwise coprime" << endl;
        }else{
            cout << "not coprime" << endl;
        }
    }
    
    
    
    

    return 0;
}


Measured memory_bytes: 14928