#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>;

int MAX = 1e6 + 10;

bool used[1000000];
int fact[1000020];

void init() {
    rep(i, MAX + 1) fact[i] = i;
    for (int i = 2; i <= MAX; i++) {
        if (fact[i] != i) continue;
        for (int j = i; j <= MAX; j += i) {
            fact[j] = i;
        }
    }
}

int main() {
    init();
    int n;
    cin >> n;
    vector<int>a(n);
    rep(i, n) cin >> a[i];
    bool pairwise = true;
    rep(i, n) {
        int x = a[i];
        vector<int>vec;
        while (x != 1) {
            if (used[fact[x]]) {
                pairwise = false;
                goto bou;
            }
            vec.push_back(fact[x]);
            x /= fact[x];
        }
        rep(i, vec.size()) {
            used[vec[i]] = 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;
}
