#include <bits/stdc++.h>
#define sz(v) (int)v.size()
#define debug(var) cout << #var << ": " << var << endl;
using namespace std;
using ll = long long;
using pii = pair<int, int>;

// primes in [1, n]
vector<int> primes, phi, vis;
void euler_sieve(int n) {
    primes.reserve((n + 1) >> 1); // -> n / log(n);
    phi = vector<int>(n + 1);
    vis = vector<int>(n + 1);
    phi[1] = 1;
    for (int i = 2; i <= n; ++i) {
        if (!vis[i]) {
            phi[i] = i - 1;
            primes.emplace_back(i);
        }
        for (int p : primes) {
            if ((ll)i * p >= n + 1) break;
            vis[i * p] = 1;
            if (i % p) phi[i * p] = phi[i] * (p - 1);
            else {
                phi[i * p] = phi[i] * p;
                break;
            }
        }
    }
}

int flag_pairwise;
set<int> used_prime;

// calculate prime divisors in x
inline void prime_factorize(ll x) {
    // ll _x = x;

    // enumerate primes less than sqrt(x)
    // for (ll p = 2; p * p <= x; i++) if(x % p == 0) {
    // for (int i = 0, p; i < (int)primes.size(); i++) {
    //     p = primes[i];
    for (ll p : primes) {
        if (x % p) continue;
        int cnt = 0;
        while(x % p == 0)
            x /= p, cnt++;
        // store or process with p, cnt, p ^ cnt...
        if (used_prime.find(p) != used_prime.end()) flag_pairwise = 0;
        used_prime.insert(p);
    }
    if (x != 1) { // last prime divisor
        int p = x, cnt = 1;
        // store or process with p, cnt, p ^ cnt...
        if (used_prime.find(p) != used_prime.end()) flag_pairwise = 0;
        used_prime.insert(p);
    }
}

const int N = 1e6 + 5;

int main() {
    euler_sieve(N);

    int n;
    cin >> n;

    int gcd_sum;
    flag_pairwise = 1;
    set<int> used_prime;
    for (int i = 0; i < n; i++) {
        int e;
        cin >> e;
        prime_factorize(e);
        gcd_sum = i == 0 ? e : __gcd(gcd_sum, e);
    }    
    cout << (flag_pairwise ? "pairwise coprime" : gcd_sum == 1 ? "setwise coprime" : "not coprime");
}