// Problem Code: abc177_e

#include <bits/stdc++.h>

using namespace std;

string E(int N, vector<int>& A) {
	int g = A[0], max_a = 1e6;
	vector<bool> is_prime(max_a + 1);
	
	for (int i = 1; i < N; i++)
		g = __gcd(A[i], g);
	if (g > 1)
		return "not coprime";
	
	// sieve of eratosthenes
	for (int a = 2; a <= max_a; a++)
		if (is_prime[a]) {
			if ((long long) a * a > max_a)
				continue;
			for (int i = a * a; i <= max_a; i += a)
				is_prime[i] = false;
		}
	
	// check is all elements are co-prime
	vector<int> B;
	for (int& x: A) {
		if (!is_prime[x])
			B.push_back(x);
	}
	
	for (int i = 0; i < B.size(); i++)
		for (int j = i + 1; j < B.size(); j++)
			if (__gcd(B[i], B[j]) > 1)
				return "setwise coprime";
	
	return "pairwise coprime";
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	
	int N;
	cin >> N;
	vector<int> A(N);
	for (int i = 0; i < N; i++)
		cin >> A[i];
	cout << E(N, A);
	
	return 0;
}