#include <bits/stdc++.h>


using namespace std;

using ll = long long;


void prime_factorization(vector<pair<ll, ll>> &res, ll x) {
    for (ll p = 2; p * p <= x; p++) {
        if (x % p != 0) {
            continue;
        }

        ll num = 0;
        while (x % p == 0) {
            ++num;
            x /= p;
        }
        res.push_back(make_pair(p, num));
    }
    if (x != 1) {
        res.push_back(make_pair(x, 1));
    }
}


int main(void) {
    ll N;
    cin >> N;
    vector<ll> A(N);
    for (ll i = 0; i < N; i++) {
        cin >> A[i];
    }

    vector<bool> used(1000000, false);
    bool flag = false;
    for (auto e : A) {
        vector<pair<ll, ll>> res;
        prime_factorization(res, e);
        for (auto p : res) {
            ll prime = p.first;
            if (used[prime]) {
                flag = true;
                break;
            }
            used[prime] = true;
        }
        if (flag)
            break;
    }
    if (!flag) {
        cout << "pairwise comprime" << endl;
        return 0;
    }

    ll g = gcd(A[0], A[1]);
    for (ll i = 1; i < N; i++) {
        g = gcd(A[i], g);
    }
    if (g == 1) {
        cout << "setwise comprime" << endl;
    } else {
        cout << "not comprime" << endl;
    }
}
