#include <bits/stdc++.h>
using namespace std;using ll=int_fast64_t;using ld=long double;constexpr ll INF=1LL<<60,MOD=1e9+7;//998244353;
void solve();int main(){cin.tie(nullptr);ios::sync_with_stdio(false);cout<<fixed<<setprecision(10);solve();return 0;}
#define SELECTOR(_1,_2,_3,_4,SELECT,...) SELECT
#define rep(...) SELECTOR(__VA_ARGS__,_rep2,_rep1,_rep0)(__VA_ARGS__)
#define _rep0(i,n) for(int i=0;i<(int)n;++i)
#define _rep1(i,k,n) for(int i=k;i<(int)n;++i)
#define _rep2(i,k,n,d) for(int i=k;d>0?i<(int)n:i>(int)n;i+=d)
#ifdef __LOCAL
#include "ostreams.h"
#endif
template<class T> inline bool chmax(T &a,const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T &a,const T &b){if(a>b){a=b;return 1;}return 0;}
template<class T> vector<T> make_vector(size_t a,T b){return vector<T>(a,b);}
template<class... Ts> auto make_vector(size_t a,Ts... ts){return vector<decltype(make_vector(ts...))>(a,make_vector(ts...));}
void print(){cerr<<endl;} template<class T,class... Ts> void print(const T& a,const Ts&... ts){cerr<<a<<' ';print(ts...);}

void solve(){
    ll n; cin >> n;
    vector<ll> A(n);
    ll g = 0;
    rep(i, n){
        cin >> A[i];
        g = gcd(g, A[i]);
    }

    if(g != 1){
        cout << "not coprime" << endl;
        return;
    }

    vector<bool> used(100001);
    for(ll a : A){
        ll k = 3 + pow(a, 0.5);
        set<ll> primes;
        rep(p, 2, k){
            while(a % p == 0){
                primes.insert(p);
                a /= p;
            }
        }
        for(ll p : primes){
            if(used[p]){
                cout << "setwise coprime" << endl;
                return;
            } else {
                used[p] = true;
            }
        }
    }

    cout << "pairwise coprime" << endl;
}