#include <iostream>
#include <vector>
#include <set>
#include <numeric>
using namespace std;
 
int main() {
    int n; cin >> n;
    vector<int> a(n);
    for (auto &e : a) cin >> e;

    set<int> primes;
    bool pairwise = true;

    for (int i = 0; i < n && pairwise; ++i) {
        int c = a[i];
        for (int j = 2; j * j <= c; ++j) {
            if (c % j) continue;
            while (c % j == 0) c /= j;
            pairwise = primes.find(j) == primes.end();
            primes.insert(c);
        }
        if (c != 1) {
            pairwise = primes.find(c) == primes.end();
            primes.insert(c);
        }
    }

    if (pairwise) {
        cout << "pairwise coprime" << endl;
        return 0;
    }

    int p = a[0];
    for (int i = 1; i < n; ++i) p = gcd(p, a[i]);

    if (p == 1) {
        cout << "setwise coprime" << endl;
        return 0;
    }

    cout << "not coprime" << endl;
}

