#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;
}

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

    //前処理
    vector<ll> Sieve(1e6 + 5, -1);
    Sieve[0] = 1;
    Sieve[1] = 1;
    repp(i, 2, 1e6 + 5) {
        if (Sieve[i] != -1) continue;
        ll m = 0;
        while (i * m <= 1e6+5) {
            ++m;
            ll multi = i * m;
            if (multi >= 1000000) break;
            if (Sieve[m * i] != -1) continue;
            Sieve[i * m] = i;
        }
    }
    //ここまで共通の処理


    ll n;
    cin >> n;
    vector<ll> a(n, 0);
    rep(i, n) cin >> a[i];

    vector<ll> cnt(1e6 + 5, 0);
    ll v_gcd = ngcd(a);

    rep(i, n) {
        ll before = 0;
        while (a[i] > 1) {
            cnt[Sieve[a[i]]]++;
            before = Sieve[a[i]];
            while ( a[i] >= Sieve[a[i]] && Sieve[a[i]] == before &&  a[i] % Sieve[a[i]] == 0 )
                a[i] /= Sieve[a[i]];
        }
    }
    bool pairwise = true;
    repp(i, 1, 1e6 + 1) {
        if (cnt[i] > 1) {
            pairwise = false;
            break;
        }
    }
    if (pairwise)
        cout << "pairwise coprime\n";
    else if (v_gcd == 1)
        cout << "setwise coprime\n";
    else
        cout << "not coprime\n";
    return 0;
}