#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i=0; i<n; ++i)
#define rep1(i,n) for(ll i=1; i<=n; ++i)
#define revrep(i,n) for(ll i=n-1; n>=0; --i)
inline constexpr ll Inf = (1ULL << 62) -1;

class primes {
    public:
    vector<int> pr;
    primes(int n) {
        vector<int> t(n+1);
        for (int i=2*2; i <= n; i += 2) {
            t[i] = 2;
        }
        pr.push_back(2);
        for (int j=3; j <= n ; j += 2) {
            if (t[j] == 0) pr.push_back(j);
            for (int i=j*2; i <= n; i += j) {
                t[i] = j;
            }
        }
    }
    vector<int> const& get() { return pr; }
    vector<pair<ll,int>> factor(ll x) {
        vector<pair<ll,int>> fs;
        if (x == 1) {
            fs.push_back({1,1});
            return fs;
        }
        if (x <= 0)
            return fs;
        if (x > pr.back()*pr.back())
            return fs;
        ll maximum = sqrt(x)+1;
        for (int p : pr) {
            if (p > maximum) {
                if (x != 1)
                    fs.push_back({x,1});
                break;
            }
            int c = 0;
            while (x % p == 0) {
                x /= p;
                ++c;
            }
            if (c)
                fs.push_back({p,c});
            if (x == 1)
                break;
        }
        return fs;
    }
};

int main() {
    ll N;
    cin >> N;
    vector<int> a(N);
    primes p(1e6);
    rep(i,N) cin >> a[i];
    set<int> s;
    bool pw = true;
    rep(i,N) {
        for (auto x : p.factor(a[i])) {
            if (s.count(x.first)) {
                pw = false;
                break;
            }
            if (a[i] != 1)
                s.insert(x.first);
        }
        if (!pw)
            break;
    }
    if (pw) {
        cout << "pairwise coprime" << endl;
        return 0;
    }
    int d = a[0];
    rep(i,N-1) {
        d = gcd(d, a[i+1]);
        if (d == 1)
            break;
    }
    string ans = (d == 1) ? "setwise coprime" : "not coprime";
    cout << ans << endl;
}
