#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <string>

using namespace std;

vector<int> make_primes(int n) {
	vector<bool> is_prime(n + 1, true);
	is_prime[0] = is_prime[1] = false;

	for (int i = 2; i * i <= n; i++) {
		if (is_prime[i]) {
			for (int j = i * i; j <= n; j += i) {
				is_prime[j] = false;
			}
		}
	}

	vector<int> primes = {2};
	for (int i = 3; i <= n; i += 2) {
		if (is_prime[i]) {
			primes.emplace_back(i);
		}
	}

	return n < 2 ? vector<int>() : primes;
}

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

	vector<int> a(n, 0);
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}

	int g = a[0];
	for (auto x: a) {
		g = gcd(g, x);
	}
	bool is_setwise = g == 1;
	if (!is_setwise) {
		cout << "not coprime" << endl;
		return 0;
	}

	int maxi = *max_element(a.begin(), a.end());
	auto primes = make_primes(maxi);

	bool is_pairwise = true;
	for (auto x: primes) {
		int cnt = 0;
		for (auto aa: a) {
			if (aa % x == 0) {
				cnt++;
			}
		}
		if (cnt > 1) {
			is_pairwise = false;
			break;
		}
	}

	if (is_pairwise) {
		cout << "pairwise coprime" << endl;
	} else {
		cout << "setwise coprime" << endl;
	}

	return 0;
}
