// 有點不耐煩會破壞偉大的計劃

#include <bits/stdc++.h>

#define append push_back

using namespace std;
using ll = long long;

const int N = 1e5 + 3;
const int M = 1e6 + 7;
const long long MOD = 1e9 + 7;
const long long INF = 1e18 + 9;
const int SM = 1e3 + 5;
const int logN = 22, BL = 400;
const double EPS = 1e-9, PI = acos(-1);
const int dx[] = {1, 0, 0, -1, -1, 1, -1, 1};
const int dy[] = {0, 1, -1, 0, -1, 1, 1, -1};

void debug(){
	cerr << "\n";
}
template<typename Type1, typename... Type2>
void debug(Type1 a, Type2... b) {
    cerr << a << " ";
    debug(b...);
}

long long lp[M];
vector<long long> pr;

int main(){
//    freopen(".in", "r", stdin);
//    freopen(".out", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);

    long long n; cin >> n;

    map<long long, long long> vals;
    long long all_gcd = 0, ans = 1;

    for(long long i = 0; i < n; i++){
        long long x; cin >> x;
        vals[x]++;
        all_gcd = __gcd(x, all_gcd);
    }

    map<long long, long long> hopes;

    for(long long i = 2; i < M; i++){
        if(!lp[i]){
            lp[i] = i;
            pr.append(i);
            if(vals.count(i)){
                hopes[i]++;
            }
        }
        for(long long j = 0; j < ll(pr.size()) && pr[j] * 1ll *  i < M && pr[j] <= lp[i]; j++){
            lp[i * 1ll * pr[j]] = pr[j];
            if(vals.count(i * pr[j])){
                hopes[pr[j]]++;
            }
        }
    }

    for(auto it : hopes){
        if(it.second > 1ll){
            ans = (all_gcd == 1ll ? 2ll : 0ll);
            break;
        }
    }

    if(ans == 0ll){
        cout << "not coprime";
    }
    else if(ans == 1ll){
        cout << "pairwise coprime";
    }
    else {
        cout << "setwise coprime";
    }

    return 0;
}
