#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
using P = pair<int,int>;
using VI = vector<int>;
using VVI = vector<VI>;

int gcd(int a, int b) {
    if (b == 0) return a;
    return gcd(b, a % b);
}

struct primes_ {
	vector<int> d;
	primes_(int n): d{2, 3} {
		if (n < 3) {
			if (n == 2) d = vector<int>(1, 2);
			else d.clear();
			return;
		}
		bool f = false;
		int end = 1;
		for(int i = 5; i <= n; i += (f = !f) ? 2 : 4) {
			while(d[end] * d[end] <= i) end++;
			bool isprime = true;
			for(int k = 0; k < end; k++) {
				if (i % d[k] == 0) {
					isprime = false;
					break;
				}
			}
			if (isprime) d.push_back(i);
		}
	}
	auto begin() {return d.begin();}
	auto end() {return d.end();}
} primes(1000000);

int main() {
    int n;
    cin >> n;
    VI a(n), d(1e6 + 1);
    rep(i, n) {
        cin >> a[i];
        d[a[i]] += 1;
    }
    for(int i = 2; i <= 1e6; i++) {
        if (d[i] > 1) {
            cout << "not coprime" << endl;
            return 0;
        }
    }
    bool pc = true;
    for(int p: primes) {
        int cnt = 0;
        for(int now = p; now <= 1e6; now += p) {
            cnt += d[now];
        }
        if (cnt >= 2) {
            pc = false;
            break;
        }
    }
    if (pc) {
        cout << "pairwise coprime" << endl;
    } else {
        int g = 0;
        rep(i, n) g = gcd(g, a[i]);
        if (g == 1) cout << "setwise coprime" << endl;
        else cout << "not coprime" << endl;
    }
}
