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

vector<int> eratos(int MAX) {
	std::vector<int> prime;
	std::vector<int> factor(MAX + 1);
	std::iota(factor.begin(), factor.end(), 0);
	for (int i = 2; i <= MAX; i++) {
		if (factor[i] == i) prime.push_back(i);
		for (size_t j = 0; j < prime.size() && i * prime[j] <= MAX && prime[j] <= factor[i]; j++) {
			factor[i * prime[j]] = prime[j];
		}
	}
	return factor;
}

signed main(){
	int N; cin >> N;
	vector<int> A(N);
	for (int i = 0; i < N; i++) scanf("%d", &A[i]);
	const int MAX = *max_element(A.begin(), A.end());
	vector<int> f(MAX + 1);
	vector<int> g(MAX + 1);
	for (int i = 1; i <= MAX; i++) {
		for (int j = 0; j <= MAX; j += i * i) {
			g[j] = i;
		}
	}
	iota(f.begin(), f.end(), 0);
	for (int i = 1; i <= MAX; i++) {
		f[i] = f[i / g[i]];
	}
	auto factor = eratos(MAX);
	vector<int> v(MAX+1);
	for (auto a : A) {
		a = f[a];
		while (a != 1) {
			if (v[factor[a]]++) {
				int g = 0;
				for (auto b : A) {
					g = gcd(g, b);
				}
				if (g == 1) cout << "setwise coprime" << endl;
				else cout << "not coprime" << endl;
				return 0;
			}
			a /= factor[a];
		}
	}
	cout << "pairwise coprime" << endl;
	return 0;
}
