#include <bits/stdc++.h>
using namespace std;

typedef long long LL;

#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define ALL(x) (x).begin(),(x).end()
const int IINF = 1e9;
const LL LINF = 1e18;
const LL MOD = 1e9+7;

template<typename T>
bool isprime(T x) {
    if(x == 1)return false;
    if(x == 2)return true;
    if(x%2 == 0)return false;

    for(LL i = 3;i*i <= x;i += 2)
        if(x%i == 0)return false;
    return true;
}

map<int, int> bunkai(int n, vector<bool> &primes) {
    map<int, int> v;
    for(;1 < n;) {
        for(int i = 2;i < 1000 && 1 < n;) {
            if(primes[i] && n%i == 0) {
                v[i]++;
                n /= i;
            }else{
                i++;
            }
        }
    }
    return v;
}

int main() {
    int N;
    cin >> N;
    map<int, bool> soinsu;
    vector<int> A(N);
    REP(i, N) {
        cin >> A[i];
    }

    vector<bool> primes(1000, false);
    REP(i, 1000) {
        primes[i] = isprime(i);
    }
    auto v = bunkai(A[N - 1], primes);
    REP(i, 1000) {
        soinsu[i] = v[i] != 0;
    }
    bool pairwise = true;
    for(int i = N - 2;0 <= i && pairwise;i--) {
        auto x = bunkai(A[i]);
        for(auto j : x) {
            pairwise = pairwise && !soinsu[j.first];
            soinsu[j.first] = true;
        }
    }

    int g = A[0];
    FOR(i, 1, N) {
        g = gcd(g, A[i]);
    }
    bool setwise = g == 1;
    if(pairwise) {
        cout << "pairwise coprime" << endl;
    }else if(setwise) {
        cout << "setwise coprime" << endl;
    }else{
        cout << "not coprime" << endl;
    }
    return 0;
}
