#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昇順

vector<int> D;
void sieve(int N) {
    vector<bool> sieved(N+1, false);
    for (int i = 2; i * i <= N; i++) {
        for (int j = i; j <= N; j += i) {
            if (!sieved[j]) {
                D[j] = i;
                sieved[j] = true;
            }
        }
    }
}

int main() {
    int N; cin >> N;
    D.assign(1000001,0);
    sieve(100000);
    ll g;
    set<int> factor;
    bool pairwise = true;
    rep(i,N) {
        int A; cin >> A;
        if (i == 0) g = A;
        else {
            g = gcd(g,A);
        }
        int n = A;
        while (pairwise && n > 1) {
            if (factor.count(D[n]) > 0) {
                pairwise = false;
                break;
            }
            factor.insert(D[n]);
            int d = D[n];
            while (n % d == 0) n /= d;
        }
    }

    if (pairwise) {
        cout << "pairwise coprime" << endl;
    } else if (!pairwise && g == 1) {
        cout << "setwise coprime" << endl;
    } else {
        cout << "not coprime" << endl;
    }
}
