#include <bits/stdc++.h>
typedef long long lint;
using namespace std;
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)

vector<int> primeFactorization(int n) {
    vector<int> result;
    int i = 2;
    while (i <= sqrt(n)) {
        if (n%i == 0) {
            result.push_back(i);
            n /= i;
        }
        i += 1;
    }
    if (n != 1) result.push_back(n);
    return result;
}

lint gcdAll(vector<lint>& v) {
    lint res = v[0];
    rep(i,v.size()) {
        res = __gcd(res, v[i]);
    }
    return res;
}
lint lcm(lint m, lint n) {
    return abs(m) / __gcd(m, n) * abs(n);
}

int main() {
    lint n; cin >> n;
    vector<lint> a(n);
    rep(i,n) cin >> a[i];
    lint MOD = 1000000011;
    //set<lint> s;
    //auto rr = primeFactorization(a[0]);
    //rep(i,rr.size()) {
    //    s.insert(rr[i]);
    //}
    sort(a.begin(), a.end());
    lint allLcm = a[0];
    lint allcc = a[0];
    for (int i=1; i<n; i++) {
        allLcm = lcm(allLcm, a[i]);
        allcc *= a[i];
        allLcm %= MOD;
        allcc %= MOD;
    }
    if (allLcm == allcc) cout << "pairwise coprime" << endl;
    else if (gcdAll(a) == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;

}