#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define all(x) (x).begin(),(x).end()
using namespace std;
const int INF=1145141919,MOD=1e9+7;
const int64_t LINF=8931145141919364364,LMOD=998244353;
// const int dy[]={0,-1,0,1,1,-1,-1,1};
// const int dx[]={1,0,-1,0,1,1,-1,-1};

map<int64_t, int> PrimeFactorization(int64_t n) {
	assert(n > 0);
	map<int64_t, int> mp;
	if(n == 1) {
		mp[1] = 1;
		return mp;
	}
	int64_t i = 2;
	while(n > 1) {
		if(n < i * i) {
			mp[n]++;
			return mp;
		}
		if(n % i == 0) {
			n /= i;
			mp[i]++;
		} else {
			i++;
		}
	}
	return mp;
}

bool pri[1000010];
int main() {
	int n; cin >> n;
	int a[n]; rep(i,n) cin >> a[i];
	bool se = false;
	int s = a[0];
	for(int i = 1; i < n; ++i) {
		s = gcd(s, a[i]);
	}
	if(s == 1) {
		se = true;
	}
	bool pa = true;
	rep(i,n) {
		auto mp = PrimeFactorization(a[i]);
		for(auto e : mp) {
			if(pri[e.first]) pa = false;
			pri[e.first] = true;
		}
	}
	if(pa) {
		cout << "pairwise coprime" << '\n';
	} else if(se) {
		cout << "setwise coprime" << '\n';
	} else {
		cout << "not coprime" << '\n';
	}
	return 0;
}