#include <bits/stdc++.h>
#define repp(i, l, r) for (long long i = (l); i < (r); i++)
#define rep(i, n) for (long long i = 0; i < (n); ++i)
#define per(i, n) for (long long i = (n); i >= 0; --i)
#define all(v) v.begin(), v.end()
const int INF = 2147483647;  // int max
const long long int MOD = 1000000007;
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T>
inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T>
inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

ll ngcd(vector<ll> a) {
    ll res;
    res = a[0];
    for (ll i = 1; i < a.size() && res != 1; i++) {
        res = gcd(a[i], res);
    }
    return res;
}

map<ll, ll> prime_factorize(long long N) {
    map<ll, ll> res;
    for (long long a = 2; a * a <= N; ++a) {
        if (N % a != 0) continue;
        long long ex = 0;
        while (N % a == 0) {
            ++ex;
            N /= a;
        }
        res[a] = 1;
    }
    if (N != 1) res[N] = 1;
    return res;
}

//ミョ(-ω- ?)
int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    ll n;
    cin >> n;
    vector<ll> a(n, 0);
    ll coprime = 0;
    rep(i, n) {
        cin >> a[i];
        coprime = gcd(coprime, a[i]);
    }
    bool b = true;
    vector<map<ll, ll>> pr(n);
    map<ll, ll> all_coprime;
    rep(i, n) {
        pr[i] = prime_factorize(a[i]);
        for (auto j : pr[i]) all_coprime[j.first]++;
    }
    bool pairwise = true;
    rep(i, n) {
        for (auto p : pr[i]) {
            if (all_coprime[p.first] - p.second > 0) {
                pairwise = false;
                break;
            }
        }
    }
    bool setwise = coprime == 1 ? 1:0;
    
    if (pairwise)
        cout << "pairwise coprime\n";
    else if (setwise)
        cout << "setwise coprime\n";
    else
        cout << "not coprime\n";
    return 0;
}