#pragma GCC target ("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

map<long long, long long> factaring(long long x) {
    map<long long, long long>ans;
    long long now = 2;
    while(now *= now <= x) {
        if (x % now == 0) {
            x /= now;
            ans[now]++;
        }
        else now++;
    }
    if (x != 1) ans[x]++;
    return ans;
}

bool used[1000000];

int main() {
    int n;
    cin >> n;
    vector<int>a(n);
    rep(i, n) cin >> a[i];
    bool pairwise = true;
    rep(i, n) {
        map<ll, ll> res = factaring(a[i]);
        for(auto x : res) {
            if (used[x.first]) {
                pairwise = false;
                goto bou;
            }
            used[x.first] = true;
        }
    }
    bou:;
    if (pairwise) {
        cout << "pairwise coprime" << endl;
        return 0;
    }
    int bout = a[0];
    rep(i, n) {
        if (i == 0) continue;
        bout = gcd(bout, a[i]);
    }
    if (bout == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
    return 0;
}
