# include <bits/stdc++.h>
# define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
# define rep2(x, y, w, h) rep (x, w) rep (y, h)
# define reps(i, n) for(int i=1, i##_len=(n); i<=i##_len; ++i)
# define reps2(x, y, w, h) reps (x, w) reps (y, h)
# define rrep(i, n) for(int i=((int)(n)-1); i>=0; --i)
# define rreps(i, n) for(int i=((int)(n)); i>0; --i)
# define range_for(i, b, e) for(int i=(b), i##_len=(e); i<i##_len; ++i)
# define step(n) rep(_, n)
# define ALL(x) (x).begin(), (x).end()
# define RALL(x) (x).rbegin(), (x).rend()
# define pb push_back
# define len(x) ((int)(x).size())
# define Find(x,key) ((x).find((key)) != (x).end())
# define optimize_cin() cin.tie(0); ios::sync_with_stdio(false)
# define debug(x) std::cerr<<#x<<": "<<(x)<<endl;
# define LINT_MAX (LLONG_MAX)
# define LINT_MIN (LLONG_MIN)
# define cauto const auto
# define int long long
# define float long double
using namespace std;
template <class Type> inline constexpr Type Square(Type x) { return x * x; }
template <class Type> inline constexpr bool InRange(const Type& x, const Type& fst, const Type& lst) { return (fst <= x) && (x < lst); }
template <class Type> inline void Unique(Type& v) { sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end()); }
template<class Integer> inline constexpr bool chmax(Integer &a, Integer b) { return a < b && (a = b, true); }
template<class Integer> inline constexpr bool chmin(Integer &a, Integer b) { return a > b && (a = b, true); }
template<class Integer>bool constexpr IsOdd(Integer &n) { return n & 1; }
template<class Integer>bool constexpr IsEven(Integer &n) { return !(n & 1); }
constexpr long long gcd(long long a, long long b) { while(b){ long long A = a; (a = b), (b = A % b); } return a; }
constexpr long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
constexpr int ctoi(const char c) { return ('0' <= c && c <= '9') ? (c - '0') : -1; }
string YesNo(bool b) { return b ? "Yes" : "No"; }
string YESNO(bool b) { return b ? "YES" : "NO"; }
string yesno(bool b) { return b ? "yes" : "no"; }
void _cin(){} template <class Head, class... Tail> void _cin(Head&& head, Tail&&... tail){ cin >> head; _cin(forward<Tail>(tail)...); }
#define Cin(Type, ...) Type __VA_ARGS__; _cin(__VA_ARGS__)
#define Cinv(Type, xs, n) vector<Type> xs(n); rep(i, n) cin >> xs[i]
#define Cinv2(Type, xs, ys, n) vector<Type> xs(n), ys(n); rep(i, n) cin >> xs[i] >> ys[i]
#define Cinv3(Type, xs, ys, zs, n) vector<Type> xs(n), ys(n), zs(n); rep(i, n) cin >> xs[i] >> ys[i] >> zs[i]
#define Cinvv(Type, xs, h, w) vector<vector<Type>> xs(h, vector<int>(w)); rep(i, h) rep(j, w) cin >> xs[i][j]
void Print() { cout << endl; }
template <class Head, class... Tail> void Print(Head&& head, Tail&&... tail) { cout << head; if (sizeof...(tail) != 0) cout << " "; Print(forward<Tail>(tail)...); }
template <class Type> void Print(vector<Type> &vec) { for (auto& a : vec) { cout << a; if (&a != &vec.back()) cout << " "; } cout << endl; }
template <class Type> void Print(vector<vector<Type>> &df) { for (auto& vec : df) { Print(vec); } }
void Debug() { cerr << endl; }
template <class Head, class... Tail> void Debug(Head&& head, Tail&&... tail) { cerr << head; if (sizeof...(tail) != 0) cerr << " "; Debug(forward<Tail>(tail)...); }
template <class Type> void Debug(vector<Type> &vec) { for (auto& a : vec) { cerr << a; if (&a != &vec.back()) cerr << " "; } cerr << endl; }
template <class Type> void Debug(vector<vector<Type>> &df) { for (auto& vec : df) { Debug(vec); } }

static const string PC = "pairwise coprime";
static const string SC = "setwise coprime";
static const string NC = "not coprime";

struct Prime {
    Prime() : Prime(1e7) {}
    Prime(int n) : table(n+1, true) {
        if(n >= 0) table[0] = false;
        if(n >= 1) table[1] = false;
        for(int i = 2; i * i <= n; i++) {
            if (not table[i]) continue;
            lst.pb(i);
            for(int k = i + i; k <= n; k += i) {
                table[k] = false;
            }
        }
    }

    vector<bool> table;
    vector<int> lst;
} PRIME;

set<int> prime_factor_fast(int n) {
    //map<int, int> ret;
    set<int> ret;
    int sqrt_n = sqrtl(n) + 1;
    auto stop = lower_bound(ALL(PRIME.lst), sqrt_n);
    for (auto it = PRIME.lst.begin(); it != stop; ++it) {
        while (n % (*it) == 0) {
            ret.insert(*it);
            n /= (*it);
        }
    }
    if (n != 1) ret.insert(n);
    return ret;
}

signed main()
{
    Cin(int, N);
    Cinv(int, A, N);
    vector<int> old = A;
    
    bool pc = true;
    bool sc = true;
    bool nc = true;

    set<int> appeared;
    rep (i, N)
    {
        set<int> ret;
        int sqrt_n = sqrtl(A[i]) + 1;
        auto stop = lower_bound(ALL(PRIME.lst), sqrt_n);
        for (auto it = PRIME.lst.begin(); it != stop; ++it) {
            if (A[i] % (*it) == 0) {
                if (Find(appeared, *it)) {
                    pc = false;
                }
                else {
                    appeared.insert(*it);
                }
            }
            while (A[i] % (*it) == 0) {
                A[i] /= (*it);
            }
        }
        if (A[i] != 1) {
            if (Find(appeared, A[i])) {
                pc = false;
            }
            else {
                appeared.insert(A[i]);
            }
        }

        if (!pc) break;
    }

    A = old;

    int sum = A[0];
    rep (i, N-1) sum = gcd(sum, A[i+1]);
    sc = (sum == 1) and !pc;
    nc = !pc & !sc;

    if (pc) Print(PC);
    if (sc) Print(SC);
    if (nc) Print(NC);

    return 0;
}



Measured memory_bytes: 20156