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

string res(int n) {
    if(n == 0) return "pairwise coprime";
    else if(n == 1) return "setwise coprime";
    else return "not coprime";
}

int main() {
    int N; cin >> N;
    vector<int64_t> A(N);
    for(auto &e : A) cin >> e;
    int64_t G = 0;
    rep(i, N) G = gcd(G, A[i]);
    bool ng = false;
    rep(i, N - 1) if(gcd(A[i], A[i + 1]) != 1) ng = true;
    if(!ng) {
        cout << res(0) << '\n';
    } else {
        if(G == 1) cout<< res(1) << '\n';
        else cout << res(2) << '\n';
    }
    return 0;
}
