#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";
}

const int M = 1e6 + 5;

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