#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n - 1); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) int(x.size())
#define get_unique(x) x.erase(unique(all(x)), x.end());
typedef long long ll;
typedef complex<double> Complex;
const int INF = 1e9;
const ll MOD = 1e9 + 7;
const ll LINF = 1e18;
template <class T>
bool chmax(T& a, const T& b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
    if (b < a) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
vector<T> make_vec(size_t a) {
    return vector<T>(a);
}
template <class T, class... Ts>
auto make_vec(size_t a, Ts... ts) {
    return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> v) {
    for (int i = 0; i < sz(v); i++) {
        os << v[i];
        if (i < sz(v) - 1) os << " ";
    }
    return os;
}
struct Factorize {
    random_device rnd;
    ll modpow(ll a, ll n, ll mod) {
        ll ret = 1;
        while (n > 0) {
            if (n & 1) ret = ll(ret) * ll(a) % ll(mod);
            a = ll(a) * ll(a) % ll(mod);
            n >>= 1;
        }
        return ret;
    }
    ll Rho(ll n) {
        auto f = [&](ll x) { return (ll(x) * ll(x) + ll(1)) % ll(n); };
        while (1) {
            ll x = uniform_int_distribution<ll>(0, n - 1)(rnd);
            ll y = f(x);
            while (1) {
                ll d = gcd(abs(x - y), n);
                if (d == n) break;
                if (1 < d) return d;
                x = f(x);
                y = f(f(y));
            }
        }
    }
    bool Miller_Rabin(ll n) {
        if (n == 1) return 0;
        ll d = n - 1, s = 0;
        while (~d & 1) d >>= 1, s++;
        auto check = [&](ll a) {
            ll x = modpow(a, d, n);
            if (x == 1) return 1;
            ll y = n - 1;
            for (int i = 0; i < s; i++) {
                if (x == y) return 1;
                x = ll(x) * ll(x) % ll(n);
            }
            return 0;
        };
        for (ll a : {2, 325, 9375, 28178, 450775, 9780504, 1795265022}) {
            if (a >= n) break;
            if (!check(a)) return 0;
        }
        return 1;
    }
    map<ll, int> operator()(ll n) {
        map<ll, int> ret;
        while (~n & 1) {
            n >>= 1;
            ret[2]++;
        }
        queue<ll> q;
        q.push(n);
        while (sz(q)) {
            ll now = q.front();
            q.pop();
            if (now == 1) continue;
            if (Miller_Rabin(now)) {
                ret[now]++;
                continue;
            }
            ll p = Rho(now);
            q.push(p);
            q.push(now / p);
        }
        return ret;
    }
} factorize;
int main() {
    int n;
    cin >> n;
    vector<int> a(n);
    int g = 0;
    rep(i, n) cin >> a[i], g = gcd(g, a[i]);

    vector<int> cnt(10010010, 0);
    for (int x : a) {
        auto mp = factorize(x);
        for (auto [val, num] : mp) cnt[val]++;
    }

    if (*max_element(all(cnt)) <= 1) {
        cout << "pairwise coprime" << endl;
    } else if (g == 1)
        cout << "setwise coprime" << endl;
    else
        cout << "not coprime" << endl;
}