#include <bits/stdc++.h>
using namespace std;

constexpr int MAX = 1e6;
int p[MAX + 10];
bool used[MAX + 10];
int main() {
	for(int i = 2; i <= MAX; ++i) {
		if(p[i] > 0) continue;
		for(int j = i; j <= MAX; j += i) {
			if(p[j] > 0) continue;
			p[j] = i;
		}
	}
	int n; cin >> n;
	int g = 0;
	bool pa = true;
	for(int i = 0; i < n; ++i) {
		int a; cin >> a;
		g = gcd(g, a);
		while(a > 1) {
			if(used[p[a]]) {
				pa = false;
			}
			used[p[a]] = true;
			while(a > 1 and a % p[a] == 0) {
				a /= p[a];
			}
		}
	}
	if(pa) {
		cout << "pairwise coprime" << '\n';
	} else if(g == 1) {
		cout << "setwise coprime" << '\n';
	} else {
		cout << "not coprime" << '\n';
	}
	return 0;
}