#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>
#include <random>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define RREP(i,m,n) for(int i=int(n)-1;i>=int(m);--i)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())
//#define int long long

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR 
#endif
using namespace std;

using UI = unsigned int;
using UL = unsigned long;
using LL = long long;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VVLL = vector<VLL>;
using VS = vector<string>;
using PII = pair<int,int>;
using VP = vector<PII>;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

// constexpr double EPS = 1e-10;
//constexpr double PI  = acos(-1.0);
//constexpr int INF = INT_MAX;
// constexpr int MOD = 1'000'000'007;
//inline void modAdd(LL &l, LL &r) {l = (l + r) % MOD;}

template<class T> inline T sqr(T x) {return x*x;}

void solve() {
    int n;
    cin >> n;
    VI a(n);
    REP(i,0,n) cin >> a[i];
    int g = a[0];
    REP(i,1,n) g = gcd(g,a[i]);
    if (g != 1) {
        cout << "not coprime" << endl;
        return;
    }
    constexpr int maxn = 1000000;
    vector<bool> isprime(maxn+1,true);
    isprime[0] = isprime[1] = false;
    REP(i,2,maxn+1) {
        if (!isprime[i]) continue;
        for (int j = i * 2; j <= maxn; j += i) isprime[j] = false;
    }
    VI ps;
    map<int, int> m;
    int idx = 0;
    REP(i,2,maxn+1) if (isprime[i]) {
        if (1LL * i * i <= 1LL * maxn) ps.push_back(i);
        m[i] = idx++;
    }
    // cout << ps.size() << endl;
    // {
    //     int cnt = 0;
    //     REP(i,0,ps.size()) cnt += 1LL * ps[i] * ps[i] <= 1LL * maxn;
    //     dump(cnt); 
    //     REP(i,0,ps.size()) if (1LL * ps[i] * ps[i] <= 1LL * maxn) dump(ps[i]);
    // }
    VI cnt(ps.size());
    REP(i,0,n) {
        if (m.count(a[i])) {
            cnt[m[a[i]]]++;
            continue;
        }
        int v = a[i];
        REP(j,0,ps.size()) {
            if (v % ps[j] != 0) continue;
            cnt[j]++;
            while (v % ps[j] == 0) v /= ps[j];
        }
        if (v > 1) cnt[m[v]]++;
    }
    for (auto &v: cnt) {
        if (v > 1) {
            cout << "setwise coprime" << endl;
            return;
        }
    }
    cout << "pairwise coprime" << endl;
}

signed main() {
    solve();
    
    return 0;
}