#include <bits/stdc++.h>
#define rep(a,n) for (int a = 0; a < (n); ++a)
using namespace std;
using ll = long long;
typedef pair<ll,ll> P;
typedef pair<P,ll> PP;
typedef vector<vector<ll> > Graph;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const ll INF = 1e18;

vector<pair<ll, ll> > prime_factorize(ll N) {
    vector<pair<ll, ll> > res;
    for (ll a = 2; a * a <= N; ++a) {
        if (N % a != 0) continue;
        long long ex = 0; // 指数

        // 割れる限り割り続ける
        while (N % a == 0) {
            ++ex;
            N /= a;
        }

        // その結果を push
        res.push_back({a, ex});
    }

    // 最後に残った数について
    if (N != 1) res.push_back({N, 1});
    return res;
}

int main(){
    ll n;
    cin >> n;
    vector<ll>a(n);
    rep(i,n)cin>>a[i];
    map<ll,ll>mp;
    rep(i,n){
        auto res = prime_factorize(a[i]);
        rep(j,res.size()){
            ll div = res[j].first;
            mp[div]++;
        }
    }
    bool fi = true;
    for(auto it=mp.begin();it!=mp.end();it++){
        if(it->second>1){
            fi=false;
            break;
        }
    }
    if(fi){
        cout << "pairwise coprime" << endl;
        return 0;
    }
    ll g = a[0];
    rep(i,n){
        g = __gcd(g,a[i]);
    }
    if(g==1){
        cout << "setwise coprime" << endl;
        return 0;
    }
    cout << "not coprime" << endl;
    return 0;
}