#include <bits/stdc++.h>
 
using namespace std;
 
#define boost                         \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL);
#define ll long long int
// #define int ll
#define vi vector<ll>
#define vvi vector<vi>
#define pii pair<int, int>
#define vii vector<pii>
#define pb push_back
#define B begin()
#define E end()
#define sz(A) (ll)(A).size()
#define F first
#define S second
#define loop(z, v) for (auto &z : v)
#define sp << ' ' <<
#define sps << ' '
#define nl "\n"
// #define nl endl
#define fat 1000000007
// #define fat 998244353
#define PI_2 1.57079632679489661923

#define N 1000005

int main() {
    ll tt = 1, n, m, l, r, c, i, j, k, w, x, y;
    boost;
    
    // cin >> tt;
    ll ans = 1001;
    vi sieve(N, 0);
    vi sprime;

    for(i = 2; i < N; i++){
        if(sieve[i]) continue;
        sprime.push_back(i);
        sieve[i] = i;

        for(j = i*i; j < N; j += i){
            if(sieve[j] != 0) continue;
            sieve[j] = i;
        }
    }

    for(int _ = 1; _ <= tt; _++) {
        // cout << "Case #" << _ << ": ";
        cin >> n;
        vi arr(n);
        loop(z, arr) cin >> z;
        bool poss = 1;

        unordered_set<int> primes;
        for(i = n - 1; i >= 0 and poss; i--){
            r = arr[i];

            while(r > 1){
                l = sieve[r];

                if(primes.find(l) != primes.end()){
                    poss = 0;
                    break;
                }
                primes.insert(l);
                while(r > 1 and l == sieve[r]) r = r/l, l = sieve[r];
            }
        }

        if(poss) cout << "pairwise coprime" << nl;
        else{
            ll gcd = arr[0];
            for(auto &z: arr) gcd = __gcd(gcd, z);

            if(gcd == 1) cout << "setwise coprime" << nl;
            else cout << "not coprime" << nl;
        }

    }
}