#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i=0; i<n; i++)
#define pb push_back
#define int long long
typedef pair<int, int> P;

int N;
vector<int> A;
int flag[1000010];

int gcd(int a, int b) {
   while (b) {
       int t = a;
       a = b;
       b = t%b;
   }
   return a;
}

vector<P> factorize(int n) {
    vector<P> res;
    for (int i=2; i*i<=n; i++) {
        int cnt = 0;
        while (n%i==0) {
            cnt++;
            n /= i;
        }
        if (cnt>0) res.pb(P(i, cnt));
    }
    if (n!=1) res.pb(P(n, 1));
    return res;
}

signed main() {
    cin.tie(0); ios::sync_with_stdio(false);
    cin >> N;
    rep(i, N) {
        int Ai;
        if (Ai!=1) A.pb(Ai);
    }
    N = A.size();
    if (N>78500) {
        int G = 0;
        rep(i, N) G = gcd(G, A[i]);
        if (G==1) cout << "setwise coprime" << endl;
        else cout << "not coprime" << endl;
        }
    }
    else {
        bool F = true;
        rep(i, N) {
            vector<P> fct = factorize(A[i]);
            rep(j, fct.size()) {
                int p = fct[j].first;
                if (flag[p]==1) F = false;
                flag[p] = 1;
            }
        }
        if (F) cout << "pairwise coprime" << endl;
        else {
            int G = 0;
            rep(i, N) G = gcd(G, A[i]);
            if (G==0 || G==1) cout << "setwise coprime" << endl;
            else cout << "not coprime" << endl;
        }
    }
}