#include <bits/stdc++.h>
#define repp(i,l,r)for(long long i=(l);i<(r);i++)
#define rep(i,n) for (long long i = 0; i < (n); ++i)
#define per(i,n) for (long long i = (n); i >= 0; --i)
#define all(v) v.begin(), v.end()
const int INF = 2147483647;//int max
const long long int MOD = 1000000007;
using namespace std;
using ll = long long;
using P = pair<int,int>;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

ll ngcd(vector<ll> a){
    ll res;
    res = a[0];
    for(ll i = 1; i < a.size() && res != 1; i++) {
        res = gcd(a[i], res);
    }
    return res;
}

//ミョ(-ω- ?)
int main() {
    cin.tie(nullptr) ;
    ios::sync_with_stdio(false) ;

    ll n;
    cin >> n;
    vector<ll> a(n, 0);
    rep(i, n) cin >> a[i];
    bool b = true;
    for (ll i = 0; i < n-1;i++){
        for (ll j = i + 1; j < n;j++){
            if(gcd(a[i],a[j]) != 1){
                b = false;
                break;
            }
        }
        if (!b) break;
    }
    if(b){
        cout << "pairwise coprime\n";
    }else if(ngcd(a) == 1){
        cout << "setwise coprime\n";
    }else {
        cout << "not coprime\n";
    }
    return 0;
}