#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int(i) = 0; (i) < (n); (i)++)
#define FOR(i, m, n) for(int(i) = (m); (i) < (n); (i)++)
#define All(v) (v).begin(), (v).end()
#define pb push_back
#define MP(a, b) make_pair((a), (b))
template <class T> vector<T> make_vec(size_t a, T val) {
    return vector<T>(a, val);
}
template <class... Ts> auto make_vec(size_t a, Ts... ts) {
    return vector<decltype(make_vec(ts...))>(a, make_vec(ts...));
}
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using Graph = vector<vector<int>>;
template <typename T> struct edge {
    int to;
    T cost;
    edge(int t, T c) : to(t), cost(c) {}
};
template <typename T> using WGraph = vector<vector<edge<T>>>;
const int INF = 1 << 30;
const ll LINF = 1LL << 60;
const int MOD = 1e9 + 7;

vector<bool> sieve(int x) { // range...[0,x]
    vector<bool> flags(x + 1, true);
    flags[0] = false, flags[1] = false;
    for(int i = 2; i * i <= x; i++) {
        if(!flags[i])
            continue;
        for(int mult = i * i; mult <= x; mult += i)
            flags[mult] = false;
    }
    return flags;
}

int main() {
    int N;
    cin >> N;
    vector<ll> A(N);
    rep(i, N) { cin >> A[i]; }
    sort(All(A));
    ll c = A[0];
    auto primes = sieve(1010);
    rep(i, N) { c = __gcd(c, A[i]); }
    if(c != 1) {
        cout << "not coprime" << endl;
    } else {
        vector<int> check(1000100, 0);
        rep(i, N) check[A[i]]++;
        int ok = 0;
        for(int i = 0; i < primes.size(); i++) {
            if(primes[i]) {
                int cnt = 0;
                for(int j = i; j < check.size(); j += i) {
                    cnt += check[j];
                }
                if(cnt >= 2)
                    ok = 1;
            }
            if(ok)
                break;
        }
        if(ok) {
            cout << "setwise coprime" << endl;
        } else {
            cout << "pairwise coprime" << endl;
        }
    }
}