#include <iostream>
#include <vector>
#include <numeric>

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

	std::vector<bool> isPrime(1000000 + 1, true);
	isPrime[0] = isPrime[1] = false;
	for (int i = 2; i <= 1000; ++i) {
		if (!isPrime[i])
			continue;

		for (int j = i * 2; j < isPrime.size(); j += i)
			isPrime[j] = false;
	}

	std::vector<int> a(n);
	int g = 0;
	for (auto&& e : a) {
		std::cin >> e;

		g = (g == 0 ? e : std::gcd(g, e));
	}

	if (g != 1) {
		std::cout << "not coprime" << std::endl;
		return 0;
	}

	std::vector<bool> factors(1000000 + 1);
	for (auto&& e : a) {
		if (isPrime[e]) {
			if (factors[e]) {
				std::cout << "setwise coprime" << std::endl;
				return 0;
			}

			factors[e] = true;
		}
	}

	for (int i = 2; i <= 1000; ++i) {
		if (!isPrime[i])
			continue;

		for (auto&& e : a) {
			if (isPrime[e])
				continue;

			if (e % i == 0) {
				if (factors[i]) {
					std::cout << "setwise coprime" << std::endl;
					return 0;
				}

				factors[i] = true;
			}
		}
	}

	std::cout << "pairwise coprime" << std::endl;
}