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

void eratosthenes(int64_t n, vector<int64_t>& prime) {
    for (auto i = 2; i < n; i++) {
        if(prime[i] != 0) continue;
        for (auto j = i; j < n; j += i) if(prime[j] == 0) prime[j] = i;
    }
}
int main(){
    int64_t n, g; bool flg = true; cin >> n;
    vector<int64_t> a(n), prime(1e6 + 1, 0);
    eratosthenes(1e6 + 1, prime);
    for (auto i = 0; i < n; i++) {
        cin >> a[i];
        g = (i == 0) ? a[i] : gcd(g, a[i]);
    }
    map<int, int> cnt;
    for (auto i = 0; i < n; i++) cnt[prime[a[i]]]++;
    for (auto & elm : cnt) {
        if(elm.second > 1) { flg = false; break; }
    }
    if(flg) cout << "pairwise coprime" << endl;
    else if(g == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
    return 0;
}