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


int main() {
    const int MOD = 1e+9 + 7;
    int N;
    cin >> N;
    vector<ll> A(N);
    rep(i, N) cin >> A[i];

    ll all_lcm = 1;
    ll all_product = 1;
    for (ll a: A) {
        all_lcm = lcm(all_lcm, a);
        all_lcm %= MOD;
        all_product *= a;
        all_product %= MOD;
    }
    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 (all_lcm == all_product) {
            ans = "pairwise coprime";
        } else {
            ans = "setwise coprime";
        }
    } else {
        ans = "not coprime";
    }
    cout << ans << endl;

    return 0;
}