#include <bits/stdc++.h>
using namespace std;
 
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
 
const int MX = 1e6;
 
int n;
bitset<MX> seen;
 
bitset<MX> val;
vector<int> primes;
void pre() {
	val.set();
	for (int i = 2; i <= 1e5; ++i) {
		if (val[i]) {
			primes.push_back(i);
			for (int j = i; j <= 1e5; j += i) {
				val[j] = false;
			}
		}
	}
}
 
 
int main() {
	cin.tie(0)->sync_with_stdio(0);
	pre();
	seen.reset();
	bool pairwise = true;
	cin >> n;
	int gcd;
	rep(i, 0, n) {
		int a; cin >> a;
		int orig = a;
		set<int> tmp;
		rep(j, 0, sz(primes)) {
			int prime = primes[j];
			while (a % prime == 0) {
				tmp.insert(j);
				a /= prime;
			}
		}
		
		for (auto j : tmp) {
			if (seen[j]) {
				pairwise = false;
			}
			seen[j] = true;
		}
		
		if (!i) gcd = orig;
		else gcd = __gcd(gcd, orig);
	}
	
	if (pairwise) cout << "pairwise coprime";
	else if (gcd == 1) cout << "setwise coprime";
	else cout << "not coprime";
}
