// Problem Code: abc177_e

#include <bits/stdc++.h>

using namespace std;

bool is_prime(int n) {
	// base cases
	if (n <= 1)
		return false;
	else if (n == 2 || n == 3)
		return true;
	else if (n % 2 == 0 || n % 3 == 0)
		return false;
	
	// primes are of the form 6k - 1 or 6k + 1
	for (int i = 5; i * i <= n; i += 6)
		if (n % i == 0 || n % (i + 2) == 0)
			return false;
	
	return true;
}

string E(int N, vector<int>& A) {
	int g = A[0];
	for (int i = 1; i < N; i++)
		g = __gcd(A[i], g);
	if (g > 1)
		return "not coprime";
	
	int cnt = 0;
	for (int& x: A) {
		cnt += !is_prime(x);
		if (cnt > 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;
}