#include <bits/stdc++.h>

using namespace std;

void fastio() {
	cin.tie(nullptr);
	cin.sync_with_stdio(false);
}

using LL = long long;
using LD = long double;

const LL MOD = 1e9+7;
const LL INF = LLONG_MAX;
const LL N = 1e6+1;

int main() {
	fastio();
	
	LL n;
	cin >> n;

	vector<LL> a(n);

	for (auto &e : a) {
		cin >> e;
	}

	LL net_gcd = a[0];
	for (LL i = 1; i < n; ++i) {
		net_gcd = __gcd(net_gcd, a[i]);
	}

	if (net_gcd != 1) {
		cout << "not coprime\n";
		return 0;
	}
	vector<LL> primes (N, 0);
	for (LL i = 0; i < n; ++i) {
		LL x = a[i];

		for (LL j = 2; j*j <= a[i]; ++j) {
			if (x % j == 0) {
				while (x % j == 0) x /= j;
				primes[j]++;
			}
		}
		if (x > 1) {
			primes[x]++;
		}
	}

	for (auto e : primes) {
		if (e > 1) {
			cout << "setwise coprime\n";
			return 0;
		}
	}
	cout << "pairwise coprime\n";

	return 0;

}