#include <bits/stdc++.h>

using namespace std;


int mod = 1e9 + 7;
const int N = 1e6+ 2;
int p[N];

void init() {
	int e = sqrt(N) + 2;
	for (int i = 2; i <= e; ++i) {
		if (!p[i]) {
			for (int j = i * i; j < N; j += i)  {
				p[j] = i;
			}
		}
	}
}

signed main() {
	int n; cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
	}
	init();
	// for (int i = 2; i < 100; ++i) cout << p[i] << " ";
	set<int> s;
	int gcd = a[0];
	bool k = false;
	int cnt = 0;
	for (int it : a) {
		if (it == 1) ++cnt;
	}
	if (cnt >= n-1) {
		cout << "pairwise coprime";
		return 0;
	}
	for (int i : a) {
		gcd = __gcd(gcd, i);
		int it = i;
		if (it == 1) continue;
		vector<int> tmp;
		while (p[it] > 0) {
			if (s.count(p[it])) k = true;
			tmp.push_back(p[it]);
			it /= p[it];
		}
		tmp.push_back(it);
		for (int pr : tmp) {
			if (!s.count(pr)) s.insert(pr);
		}
	}
	if (gcd != 1) cout << "not coprime";
	else if (k) cout << "setwise coprime";
	else cout << "pairwise coprime";
	cout << endl;
}
