#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<n; i++)
#define rep1(i, n) for(int i=1; i<=n; i++)
#define repr(i, n) for(int i=n-1; i>=0; i--)
#define repr1(i, n) for(int i=n; i>=1; i--)
#define all(v) v.begin(),v.end()
using ll = long long;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const int INF = 1e9;
const ll LLINF = 1e18;
const ll MOD = 1e9+7;
const double EPS = 1e-10;
const double PI = acos(-1);
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

template<typename T>
T gcd(T x, T y) {
    if (y==0) return x;
    return gcd(y, x % y);
}

template<typename T>
T lcm(T x, T y) {
    T g = gcd(x, y);
    return x / g * y;
}

const int MAX = 1000010;

int main() {
    int n; cin >> n;
    vector<int> a(n);
    rep(i, n) cin >> a[i];

    vector<ll> d(MAX, -1);
    for (int i = 2; i < MAX; i++) {
        if (d[i] > 0) continue;
        for (int j = 2*i; j < MAX; j += i) {
            if (d[j] < 0) d[j] = i;
        }
    }
    rep(i, MAX) if (d[i] < 0) d[i] = i;

    bool pairwise = true;
    set<int> s;
    rep(i, n) {
        if (s.find(d[a[i]]) != s.end()) {
            pairwise = false;
            break;
        }
        s.insert(d[a[i]]);
    }

    if (pairwise) {
        cout << "pairwise coprime" << endl;
        return 0;
    }

    ll g = a[n-1];
    rep(i, n-1) g = gcd(g, a[i]);
    if (g == 1) {
        cout << "setwise coprime" << endl;
        return 0;
    }

    cout << "not coprime" << endl;
}
