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

#pragma region Macros
using ll = long long;
#define int ll
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
template<class T = ll> using V = vector<T>;
template<class T = ll> using VV = V<V<T>>;
#define IOS\
    ios::sync_with_stdio(false);\
    cin.tie(0);\
    cout.tie(0);
#define FOR(i,l,r) for(ll i=(l);i<(r);++i)
#define REP(i,n) FOR(i,0,n)
#define REPS(i,n) FOR(i,1,n+1)
#define RFOR(i,l,r) for(ll i=(l);i>=(r);--i)
#define RREP(i,n) RFOR(i,n-1,0)
#define RREPS(i,n) RFOR(i,n,1)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define SORT(name) sort(name.begin(), name.end())
#define RSORT(name)\
    SORT(name);\
    reverse(all(name));
#define ZERO(p) memset(p, 0, sizeof(p))
#define MINUS(p) memset(p, -1, sizeof(p))
inline void Yes(bool b = true) {cout << (b ? "Yes" : "No") << '\n';}
inline void YES(bool b = true) {cout << (b ? "YES" : "NO") << '\n';}
template <class T> inline void print(T x){ cout << x << '\n';}
template<typename T1,typename T2> inline void chmin(T1 &a, T2 b){ if(a > b) a = b; }
template<typename T1,typename T2> inline void chmax(T1 &a, T2 b){ if(a < b) a = b; }

const ll LLINF = (1LL<<60);
const int INF = (1LL<<30);
const double DINF = std::numeric_limits<double>::infinity();
#pragma endregion

#if 1
#  define DBG(fmt, ...) printf(fmt, ##__VA_ARGS__)
#else
#  define DBG(fmt, ...)
#endif

template <typename T> T gcd(T a, T b) { while (a) { b %= a; swap(a, b); } return b; }

// 高速素因数分解
// 構築 O(N log log N), 導出 O(log N)
class SmartSieve {
public:
    SmartSieve(ll l, ll r) { Init(l, r); }
    // [L, R) の範囲を素因数分解することにする
    // 事前準備 O(N log log N)
    void Init(ll l, ll r) {
        m_L = l;
        m_R = r;
        m_M = sqrt(m_R) + 1;
        m_Small.resize(m_M);
        iota(m_Small.begin(), m_Small.end(), 0);
        m_Large.resize(m_R - m_L);
        m_Aux.assign(m_R - m_L, 1);

        for (ll i = 2; i * i < m_R; ++i) {
            if (m_Small[i] < i) { continue; }
            m_Small[i] = i;
            for (ll j = i * i; j < m_M; j += i) {
                if (m_Small[j] == j) { m_Small[j] = i; }
            }
            for (ll j = (m_L + i - 1) / i * i; j < m_R; j += i) {
                ll k = j;
                do {
                    // m_Aux[j - m_L] > m_M で判定した方がいいかも？
                    // j / m_Aux[j - m_L] < m_M の方がいい？（割り算したくない）
                    if (m_Aux[j - m_L] * m_Aux[j - m_L] > m_R) { break; }

                    m_Large[j - m_L].push_back(i);
                    m_Aux[j - m_L] *= i;
                    k /= i;
                } while (k % i == 0);
            }
        }
    }

    // n の素因数分解結果を返す O(log N)
    // first: 素因数 second: それが登場する回数
    map<ll, int> Factor(ll n) {
        assert(m_L <= n && n < m_R);
        map<ll, int> res;
        for(auto& tmp : m_Large[n - m_L]) {
            res[tmp]++;
        }
        n /= m_Aux[n - m_L];
        if (n >= m_M) {
            // この場合，n は素数となることが示せる（はず）
            // n*n >= R だとオーバーフローしそう？
            res[n]++;
            return res;
        }
        while (n > 1) {
            res[m_Small[n]]++;
            n /= m_Small[n];
        }
        return res;
    }

public:
    ll m_L, m_R, m_M;
    vector<int> m_Small;         // 小さい篩
    vector<vector<ll>> m_Large;  // 大きい篩
    vector<ll> m_Aux;            // m_Aux[i] := m_Large[i] の素因数の積
};

const int MOD = 1000000007;
const int MAX_N = 1000010;

signed main() {
    IOS;

    int N;
    cin >> N;
    V<> A(N);
    REP(i, N) {
        cin >> A[i];
    }
    SmartSieve ss(0, MAX_N);
    set<int> exist;
    bool isExist = false;
    REP(i, N) {
        auto res = ss.Factor(A[i]);
        for(auto n : res) {
            if(exist.find(n.first) != exist.end()) {
                isExist = true;
                break;
            }
            exist.insert(n.first);
        }
        if(isExist) { break; }
    }
    if(!isExist) {
        print("pairwise coprime");
        return 0;
    }

    int cur = A[0];
    REP(i, N) { cur = gcd(cur, A[i]); }
    if(cur == 1) {
        print("setwise coprime");
        return 0;
    }

    print("not coprime");
    return 0;
}


Measured memory_bytes: 86108