#include <bits/stdc++.h>
using namespace std;
using lli = long long;

vector<int> num(1000006);
vector<pair<int, bool>> primes;

void Sieve() {
    std::vector<bool> flags(1000006, true);
    flags[0]         = false;
    flags[1]         = false;
    const int sqrt_x = 1003;
    for (int p = 2; p < sqrt_x; p++) {
        if (!flags[p]) continue;
        for (lli mult = p * p; mult < 1000006; mult += p) flags[mult] = false;
        primes.push_back(make_pair(p, false));
    }
}

int main() {
    Sieve();

    size_t n;
    cin >> n;
    vector<int> a(n);
    for (int& ai : a) cin >> ai;

    int g = a[0];
    for (size_t i = 1; i < n; i++) g = __gcd(g, a[i]);
    if (g != 1) {  // not setwise coprime
        cout << "not coprime\n";
        return 0;
    }

    for (const int ai : a) {
        for (pair<int, bool>& pi : primes) {
            if (ai % pi.first == 0) {
                if (pi.second) {
                    // not pairwise coprime
                    cout << "setwise coprime\n";
                    return 0;
                }
                pi.second = true;
            }
        }
    }

    cout << "pairwise coprime\n";

    return 0;
}
