#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
#define rep(i,n) for(int i = 0; i < ((int)(n)); i++)   // 0-indexed昇順

int main() {
    int N; cin >> N;
    vector<int> A(N);
    ll g;
    rep(i,N) {
        cin >> A.at(i);
        if (i == 0) g = A[0];
        else g = gcd(g,A[i]);
    }

    bool pairwise = true;
    rep(i,N) {
        for (int j = i + 1; j < N; j++) {
            if (gcd(A[i], A[j]) != 1) {
                pairwise = false;
                goto QUIT;
            }
        }
    }
QUIT:
    if (pairwise) {
        cout << "pairwise coprime" << endl;
    } else if (!pairwise && g == 1) {
        cout << "setwise coprime" << endl;
    } else {
        cout << "not coprime" << endl;
    }
}
