#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for(ll i=0;i<(ll)(n);i++)
#define rep2(i, m, n) for(ll i=m;i<(ll)(n);i++)
#define rrep(i, n, m) for(ll i=n;i>=(ll)(m);i--)
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const int ddx[8] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ddy[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const ll MOD = 1000000007;
const ll INF = 1000000000000000000L;
#ifdef __DEBUG

/**
 * For DEBUG
 * https://github.com/ta7uw/cpp-pyprint
 */
#include "cpp-pyprint/pyprint.h"

#endif

void solve() {
    ll N;
    cin >> N;;
    vector<ll> A(N);
    rep(i, N) cin >> A[i];
    map<ll, ll> cnt;
    rep(i, N) {
        cnt[A[i]]++;
    }
    bool ok = true;
    rep2(i, 2, 1e3 + 5) {
        ll v = i;
        ll c = 0;
        while (v <= 1e6) {
            c += cnt[v];
            v += i;
        }
        if (c >= 2) {
            ok = false;
            break;
        }
    }
    if (ok) {
        cout << "pairwise coprime" << '\n';
        return;
    }
    ll g = 0;
    rep(i, N) {
        g = gcd(g, A[i]);
    }
    if (g == 1) {
        cout << "setwise coprime" << '\n';
    } else {
        cout << "not coprime" << '\n';
    }
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    solve();
    return 0;
}
