#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

const int mxA = 1e6;

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	vector<int> primes;
	vector<bool> is_prime(mxA + 1, true);
	is_prime[0] = is_prime[1] = false;
	for (int i = 0; i <= mxA; i++) {
		if (is_prime[i]) {
			primes.push_back(i);
			for (int j = 2 * i; j <= mxA; j += i) {
				is_prime[j] = false;
			}
		}
	}
	bool pairwise = true;
	for (int p : primes) {
		int cnt = 0;
		for (int i = 0; i < n; i++) {
			cnt += a[i] % p == 0;
		}
		if (cnt >= 2) {
			pairwise = false;
			break;
		}
	}
	if (pairwise) {
		cout << "pairwise coprime";
		return 0;
	}
	int gcd = 0;
	for (int i = 0; i < n; i++) {
		gcd = __gcd(gcd, a[i]);
	}
	if (gcd == 1) {
		cout << "setwise coprime";
	} else {
		cout << "not coprime";
	}
}

