#include <bits/stdc++.h>
#define WHOLE(v) (v).begin(), (v).end()
#define REV_WHOLE(v) (v).rbegin(), (v).rend()
using i64 = int64_t;
using namespace std;
template<class F>auto recursive(F f){return[f](auto...a){return f(f,a...);};}
template<class T>using rev_priority_queue=priority_queue<T,vector<T>,greater<T>>;
template<class T>using vector2d=vector<vector<T>>;
struct fixprec{int p;fixprec(int p):p(p){}}; ostream&operator<<(ostream&o,fixprec f){return o<<fixed<<setprecision(f.p);}
/*!* [intutil] *!*/
/*+* 整数演算いろいろ *+*/
i64 divceil(i64 a, i64 b) {
    return a / b + (a > 0 && a % b ? 1 : 0);
}
i64 logceil(i64 a, i64 b) {
    for(i64 i = 0, x = 1; a >= 2; x *= a, i++) if(x <= b) return i; return 0;
}
i64 gcd(i64 a, i64 b) {
    for (i64 c; a;) c = a, a = b % a, b = c; return b;
}
i64 lcm(i64 a, i64 b) {
    return (a / gcd(a, b) * b);
}
i64 pmod(i64 x, i64 m) {
    return (x % m + m) % m;
}

/*!* [prime] *!*/
/*+* 素数生成、素因数分解 *+*/

// 素数列を作る
// N: 上限, v: 出力先
struct PrimeSet {
    static vector<i64> p;
    static void Init(i64 N) {
        i64 c = 1;
        for (i64 c = 2; c <= N; c++) {
            bool flag = true;
            i64 d = (i64)sqrt(c);
            for (int i = 0; i < p.size(); i++) {
                if (c % p[i] == 0) {
                    flag = false;
                    break;
                }
                if (d < p[i]) break;
            }
            if (flag) p.push_back(c);
        }
    }
};

vector<i64> PrimeSet::p;
// 素因数分解を行う
// N: 対象, p: 素数セット(GetPrimesで取得), m: 因数分解形式のマップ
void Factorize(i64 N, map<i64, int> &m) {
    vector<i64> &p = PrimeSet::p;
    for (int i = 0; N != 1 && i < p.size(); i++) {
        while (N % p[i] == 0) {
            if (!m.count(p[i])) m[p[i]] = 0;
            N /= p[i];
            m[p[i]]++;
        }
    }
    if (N > 1) m[N] = 1;
}

int main() {
    int N;
    cin >> N;
    bool pairwise = true;
    PrimeSet::Init(1e4 + 10);
    vector<i64> A(N);
    for(i64 &a : A) cin >> a;
    for(i64 p : PrimeSet::p) {
        int c = 0;
        for(i64 a : A) {
            if(a % p == 0) c++;
        }
        if(c > 1) {
            pairwise = false;
            break;
        }
    }
    if(pairwise) {
        cout << "pairwise coprime" << endl;
        return 0;
    }
    i64 g = A[0];
    for(i64 a : A) {
        g = gcd(g, a);
    }
    if(g == 1) {
        cout << "setwise coprime" << endl;
    } else {
        cout << "not coprime" << endl;
    }
    return 0;
}
