//#pragma GCC target("avx2,avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
constexpr char ln = '\n';
template<class T1, class T2> inline bool chmax(T1 &a, T2 b) {if (a < b) {a = b; return true;} return false;}
template<class T1, class T2> inline bool chmin(T1 &a, T2 b) {if (a > b) {a = b; return true;} return false;}
struct Fast_ios {Fast_ios() {cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20);};} fast_ios;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

struct Osa_k {
    int N;
    vector<int> table;

    Osa_k() {}
    Osa_k(int N) : N(N), table(N+1) {
        iota(table.begin(),table.end(),0);
        for (int i = 2; i*i <= N; i++) {
            if (table[i] == i) {
                for (int j = i; j <= N; j += i) {
                    if (table[j]==j) table[j] = i;
                }
            }
        }
    }

    int operator[](int i) const {return table[i];}

    vector<pair<int, int>> prime_factor(int x) {
        assert(1 <= x and x <= N);
        vector<pair<int, int>> ret;
        while (x != 1) {
            if (ret.empty() or ret.back().first != table[x]) {
                ret.emplace_back(table[x],1);
            } else {
                ret.back().second++;
            }
            x /= table[x];
        }

        return ret;
    }
};

////////////////////////////////////////////////////////////////////////////////////////////////////////////

void ABC177E() {
    int N; cin >> N;
    vector<int> A(N);
    rep(i,N) cin >> A[i];
    
    const int MAX = 1e6;
    Osa_k Os(MAX);
    vector<bool> seen(MAX+1);
    bool pc = true;
    int g = 0;
    rep(i,N) {
        auto a = Os.prime_factor(A[i]);
        for (auto j : a) {
            if (seen[j.first]) pc = false;
            else seen[j.first] = 1;
        }
        g = gcd(g,A[i]);
    }

    if (pc) {
        cout << "pairwise coprime" << ln;
    } else {
        cout << (g == 1 ? "setwise coprime" : "not coprime") << ln;
    }
}

int main() {
    ABC177E();
}
