#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i,N) for(int i = 0; i < (N); i++)
#define erep(i,N) for(int i = N - 1; i >= 0; i--)
const ll INF = 1000000000;
const ll MOD = 1000000007;
const ld PI = (acos(-1));
using Graph = vector<vector<int>>;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true;} return false;}
typedef pair<int, int> P;
typedef pair<ll,ll> PLL;
double rad(double a) {return a * 180 / PI;}

struct UnionFind {
    vector<int> par; // par[i]:iの親の番号 (例) par[3] = 2 : 3の親が2

    UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
        for(int i = 0; i < N; i++) par[i] = i;
    }

    int root(int x) { // データxが属する木の根を再帰で得る：root(x) = {xの木の根}
        if (par[x] == x) return x;
        return par[x] = root(par[x]);
    }

    void unite(int x, int y) { // xとyの木を併合
        int rx = root(x); //xの根をrx
        int ry = root(y); //yの根をry
        if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
        par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時：xの根rxをyの根ryにつける
    }

    bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
        int rx = root(x);
        int ry = root(y);
        return rx == ry;
    }
};

long long modinv(long long a, long long m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

//dpTable
int dp[100050];

int main(){
    int N;
    cin >> N;
    vector<int> A(N);
    bool pairwise = false;
    int setGCD;
    rep (i,N) {
        cin >> A.at(i);
        if (i == 0) setGCD = A.at(0);
        else setGCD = __gcd(setGCD,A.at(i));
    }
    bool gcd1 = false,gcd2 = false;
    for (int i = 0; i < N; i++) {
        if (A.at(i) != 1) gcd1 = true;
    }
    int bool1 = 0,bool2 = 0,bool3 = 0;
    for (int i = 0; i < N; i++) {
        if (A.at(i) > 3) gcd2 = true;
        else {
            if (A.at(i) == 1) bool1++;
            if (A.at(i) == 2) bool2++;
            if (A.at(i) == 3) bool3++;
        }
    }
    if (gcd1 && !(gcd2)) {
        cout << "not coprime" << endl;
    }
    else {
        vector<bool> list(1000050,false);
        for (int i = 0; i < N; i++) {
            int sqrtA = sqrt(A.at(i));
            for (int j = 2; j <= sqrtA; j++) {
                if (A.at(i) % j == 0) {
                    if (!(list.at(j) || list.at(A.at(i) / j))) {
                        list.at(j) = true;
                        list.at(A.at(i) / j) = true;
                    }
                    else {
                        pairwise = true;
                        break;
                    }
                }
            }
            list.at(A.at(i)) = true;
            if (pairwise) break;
        }
        if (!pairwise) cout << "pairwise coprime" << endl;
        else if (setGCD == 1) cout << "setwise coprime" << endl;
        else cout << "not coprime" << endl;
    }
    return 0;
}
