#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define reps(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; --i)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define repc2(i, s, n) for (int i = (s); i <= (int)(n); i++)
#define inf 2e9
#define linf 9000000000000000000ll
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

int n;
vector<int> v;
vector<bool> sieve(1000009);

void prime_factorize(int n, vector<int> &res) {
    if (n <= 1) return;
    for (int i = 2; i * i <= n; i++) {
        while (n % i == 0) {
            res.push_back(i);
            n /= i;
        }
    }
    if (n != 1) {
        res.push_back(n);
    }
}

int main() {
    cin >> n;
    v.resize(n);
    rep(i, n) scanf("%d", &v[i]);
    sort(all(v));
    bool is_pc = true;
    for (int i : v) {
        if (sieve[i]) {
            is_pc = false;
            break;
        }
        vector<int> pf;
        prime_factorize(i, pf);
        for (int p : pf) {
            sieve[p] = true;
            for (int j = p * 2; j <= 1000000; j += i) {
                if (!sieve[j]) {
                    sieve[j] = true;
                }
            }
        }
        if (!is_pc) break;
    }
    if (is_pc) {
        cout << "pairwise coprime" << endl;
    } else {
        if (accumulate(v.begin(), v.end(), 0, [](int m, int n) { return __gcd(m, n); }) == 1) {
            cout << "setwise coprime" << endl;
        } else {
            cout << "not coprime" << endl;
        }
    }

    return 0;
}