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

const int sz = 1e6 + 1;
vector<bool> primes(sz);
vector<int> g(sz);

void solve() {
    // INPUT
    int n; cin >> n;
    set<int> input;
    bool pairwise = true;
    for (int i = 0; i < n; ++i) { 
        int a;
        cin >> a;
        if (input.count(a)) pairwise = false;
        input.insert(a);
    }

    // LOGIC
    int M = *input.rbegin();
    fill(g.begin(), g.end(), 0);
    fill(primes.begin(), primes.end(), true);
    primes[0] = false;
    primes[1] = false;
    for (int i = 2; i * i <= sz; i++) {
        if (primes[i]) {
            for (int j = 2 * i; j <= sz; j += i) {
                primes[j] = false;
                if (input.count(j)) g[i]++;
            }
        }
    }

    for (int i = 2; i <= sz; ++i) {
        pairwise = pairwise && (g[i] < 2);
    }

    int p = *input.begin();
    for (auto it = next(input.begin()); it != input.end(); ++it) {
        p = __gcd(p, *it);
    }

    if (pairwise) cout << "pairwise coprime\n";
    else if (p == 1) cout << "setwise coprime\n";
    else cout << "not coprime\n";
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int t = 1;
    while(t--) {
        solve();
    }
}
