#include <bits/stdc++.h>
using namespace std;
constexpr int N = 1e6 + 100;

int p[N];

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

int main() {
    init();
	int n;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++)
		cin >> a[i];
	vector<set<int>> div(n);
	for (int i = 0; i < n; i++) {
		for (int j = a[i]; p[j] != 0; j /= p[j]) {
			div[i].insert(p[j]);
		}
	}
	bool pairwise = true;
	map<int, int> cnt;
	for (int i = 0; i < n; i++) {
		for (const auto &x : div[i]) {
			if (++cnt[x] >= 2)
				pairwise = false;
            //cout << x << ' ';
		}
		//cout << "\n";
	}
	bool setwise = false;
	int gcd = 0;
	for (int i = 0; i < n; i++)
		gcd = __gcd(gcd, a[i]);
	if (gcd == 1)
		setwise = true;
	if (pairwise)
		cout << "pairwise coprime" << "\n";
	else if (setwise)
		cout << "setwise coprime" << "\n";
	else
		cout << "no coprime" << "\n";
}
