#include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < (int)(n); i++)
#define ALL(a) a.begin(), a.end()
#define MOD 1000000007
using namespace std;
using ll = long long;

int main() {
    int N; cin >> N;
    vector<int> A(N);
    REP(i, 0, N) cin >> A[i];

    vector<int> primes((int)1e6 + 1, 0);
    for (int i = 2; i * i <= (int)1e6; i++) {
        if (primes[i]) continue;
        for (int j = i; j <= (int)1e6; j += i) {
            primes[j] = i;
        }
    }

    int g = 0;
    bool pairwise = true;
    vector<int> factors((int)1e6 + 1, 0);
    REP(i, 0, N) {
        // cout << "# i : " << i << endl;
        g = gcd(g, A[i]);
        while (A[i] != 1) {
            // cout << A[i] << endl;
            int pf = primes[A[i]];
            if (factors[pf]) pairwise = false;
            while (A[i] % pf == 0) A[i] /= pf;
            factors[pf]++;
        }
    }

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

    return 0;
}