#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ull = uint64_t;
const ll INF = 9e18;

void print() { cout << endl; }
template <typename Head, typename... Tail>
void print(Head head, Tail... tail) {
    int size = sizeof...(Tail);
    cout << head;
    if (size > 0) {
        cout << " ";
    }
    print(tail...);
}

void print0() {}
template <typename Head, typename... Tail>
void print0(Head head, Tail... tail) {
    cout << head;
    print0(tail...);
}

vector<ll> mkprimes(ll N) {
    vector<bool> isprime(N + 1);
    vector<ll> primes;
    for (ll i = 0; i <= N; i++) {
        isprime[i] = true;
    }
    isprime[0] = false;
    isprime[1] = false;

    for (ll i = 2; i <= N; i++) {
        if (isprime[i]) {
            primes.push_back(i);
            for (ll j = 2 * i; j <= N; j += i) {  // 素数iの倍数は素数ではない
                isprime[j] = false;
            }
        }
    }
    return primes;
}

vector<vector<ll>> prime_factors0(ll m) {
    vector<vector<ll>> result(m + 1);

    vector<ll> primes = mkprimes(m);
    vector<bool> isprime(m + 1, false);
    for (auto p : primes) {
        isprime[p] = true;
    }

    for (ll nn = 2; nn <= m; nn++) {
        if (isprime[nn]) {
            result[nn].push_back(nn);
            continue;
        }
        ll n = nn;
        for (auto p : primes) {
            if (n % p == 0) {
                bool exist = false;
                for (ll pp : result[n / p]) {
                    if (pp == p) {
                        exist = true;
                    }
                    result[n].push_back(pp);
                }
                if (!exist) {
                    result[n].push_back(p);
                }
                break;
            }
        }
    }
    return result;
}

vector<map<ll, ll>> prime_factors(ll m) {
    // エラトステネスの篩
    vector<ll> divprimes(m + 1, -1);
    vector<bool> isprime(m + 1, true);
    isprime[0] = false;
    isprime[1] = false;
    for (ll i = 2; i <= m; i++) {
        if (isprime[i]) {
            divprimes[i] = i;
            for (ll j = 2 * i; j <= m; j += i) {
                divprimes[j] = i;  // その数をふるい落とした素数を記録
                isprime[j] = false;
            }
        }
    }

    vector<map<ll, ll>> result(m + 1);
    for (ll i = 2; i <= m; i++) {
        ll p = divprimes[i];
        for (auto pf : result[i / p]) {
            result[i].insert(pf);
        }
        if (result[i].count(p)) {
            result[i][p]++;
        } else {
            result[i][p] = 1;
        }
    }
    return result;
}

int main() {
    ll N;
    cin >> N;
    vector<ll> A(N);
    for (ll i = 0; i < N; i++) {
        cin >> A[i];
    }
    ll maxval = 1000000;
    auto pfs = prime_factors(maxval);

    vector<ll> usecount(maxval + 1, 0);
    for (ll i = 0; i < N; i++) {
        ll n = A[i];
        for (auto pf : pfs[n]) {
            usecount[pf.first]++;
        }
    }
    ll maxusecount = 0;
    for (auto u : usecount) {
        maxusecount = max(maxusecount, u);
    }
    if (maxusecount == N) {
        print("not coprime");
        return 0;
    } else if (maxusecount >= 2) {
        print("setwise coprime");
        return 0;
    } else {
        print("pairwise coprime");
        return 0;
    }
}


Measured memory_bytes: 244220