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

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;
}

bool check_pairwise(vector<int> &a, vector<int> &primes) {
	set<int> checked;

	for (auto x: a) {
		for (auto prime: primes) {
			bool has_prime = false;
			while (x % prime == 0) {
				x /= prime;
				has_prime = true;
			}
			if (has_prime) {
				if (checked.count(prime) == 0) {
					checked.insert(prime);
				} else {
					return false;
				}
			}

			if (x == 1) {
				break;
			}
		}

	}

	return true;
}

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

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

	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;
	}

	auto primes = make_primes(a.back());
	// cout << primes.size() << endl;
	// cout << primes.back() << endl;

	bool is_pairwise = check_pairwise(a, primes);
	if (is_pairwise) {
		cout << "pairwise coprime" << endl;
	} else {
		cout << "setwise coprime" << endl;
	}
	return 0;
}
