#include <bits/stdc++.h>
#define rep(i, start, end) for (long long i = start; i < end; ++i)
#define repreverse(i, start, end) for (long long i = start; i >= end; --i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define len(x) ((long long)(x).size())
#define lcm(a, b) ((a) / __gcd((a), (b)) * (b))
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using vllvll = vector<vll>;
using vc = vector<char>;
using pll = pair<ll, ll>;
template<class T>void print1d(T x,ll n=-1){if(n==-1)n=x.size();rep(i,0,n){cout<<x[i]<<' ';}cout<<'\n';}
template<class T>void print2d(T x,ll r=-1,ll c=-1){if(r==-1)r=x.size();if(c==-1)c=x[0].size();rep(i,0,r)print1d(x[i],c);}
template<class T, class U>bool haskey(T mp, U key) { return mp.find(key) != mp.end(); }
template<class T, class U>bool isin(T el, U container) { return find(all(container), el) != container.end(); }
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; }
template<class T>bool even(T n) { return ! (n & 1); }
template<class T>bool odd(T n) { return n & 1; }
template<class T>ld deg2rad(T deg) { return M_PI * deg / 180.0; }
template<class T>ld rad2deg(T rad) { return 180.0 * rad / M_PI; }
ll intpow(ll a,ll n){ll p=1;while(n){if(n&1)p*=a;a*=a;n>>=1;}return p;} 
const long double pi = M_PI;
const long long big = 1LL << 50;
const long long inf = 1LL << 60;
const long long mod = 1e9 + 7;


template <typename T>
std::vector<std::pair<T, T> > factorint(T n)
{
        std::vector<std::pair<T, T> > res;
        for (T i = 2; i*i <= n; ++i) {
                T counter = 0;
                while (n % i == 0) {
                        n /= i;
                        ++counter;
                }
                if (counter != 0) {
                        res.push_back(std::make_pair(i, counter));
                }
        }
        if (n != 1) {
                res.push_back(std::make_pair(n, 1));
        }
        return res;
}

int main()
{
        ll N;
        cin >> N;
        vll A(N);
        rep(i, 0, N) cin >> A[i];

        bool f = false;
        ll ag = 0;
        rep(i, 0, N) ag = __gcd(ag, A[i]);
        if (ag == 1) f = true;

        // vll l(N+1, 1), r(N+2, 1);
        // rep(i, 0, N) {
        //         l[i+1] = __gcd(l[i+1], __gcd(l[i], A[i]));
        // }
        // repreverse(i, N+1, 1) {
        //         r[i] = __gcd(r[i], __gcd(r[i+1], A[i-1]));
        // }

        // rep(i, 0, N) {
        //         ll g = l[i];
        //         rep(j, i+1, N) {
        //                 ll gg = __gcd(g, A[j]);
                        
        //                 if (gg != 1) {
        //                         if (f) {
        //                                 cout << "setwise coprime" << endl;
        //                                 return 0;
        //                         } else {
        //                                 cout << "not coprime" << endl;
        //                                 return 0;
        //                         }
        //                 }
        //         }
        // }

        map<ll, ll> mp;
        rep(i, 0, N) {
                ll n = A[i];
                auto v = factorint(n);
                rep(j, 0, len(v)) {
                        if (mp[v[j].first] != 0) {
                                if (f) {
                                        cout << "setwise coprime" << endl;
                                        return 0;
                                } else {
                                        cout << "not coprime" << endl;
                                        return 0;
                                }  
                        } else mp[v[j].first]++;
                }
        }

        cout << "pairwise coprime" << endl;
}


Measured memory_bytes: 11128