#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;


vector<vector<int>> calc_divisor_list(ll n) {
    vector<vector<int>> divisor_list(n + 1, vector<int>());

    ll root_n = (ll)(sqrt(n) + 0.5);
    for (int i = 2; i <= root_n; i++) {
        for (int j = 2 * i; j <= n; j += i) {
            divisor_list[j].push_back(i);
        }
    }
    return divisor_list;
}


int main() {
    int N;
    cin >> N;
    vector<ll> A(N);
    rep(i, N) cin >> A[i];

    ll MAX_A = 1e+6;
    auto divisor_list = calc_divisor_list(MAX_A);

    vector<bool> visited(MAX_A + 1, false);
    bool is_pairwise = true;
    for (ll a: A) {
        auto d_list = divisor_list[a];
        for (auto d: d_list) {
            if (visited[d]) is_pairwise = false;
            else visited[d] = true;
        }
        visited[a] = true;
    }

    ll all_gcd = A[0];
    for (int i = 1; i < N; i++) {
        all_gcd = gcd(all_gcd, A[i]);
    }
    
    string ans;
    if (all_gcd == 1) {
        if (is_pairwise) {
            ans = "pairwise coprime";
        } else {
            ans = "setwise coprime";
        }
    } else {
        ans = "not coprime";
    }
    cout << ans << endl;

    return 0;
}