#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
vector<int> primes;
void sieve() {
	int lim = 1e6;
	vector<bool> mark(lim+5,true);
	for (int p = 2; p*p<=lim; p++) {
		if (mark[p]) {
			for (int j=p*p; j<=lim; j+=p) {
				mark[j] = false;
			}
		}
	}
	//int it = 0;
	for (int p = 2; p<=lim; p++) {
		if (mark[p]) {
			primes.emplace_back(p);
		}
	}
}

int main() {
	//ios_base::sync_with_stdio(false);
	//cin.tie(NULL);
	sieve();
	int n;
	cin >> n;
	vector<ll> a(n);
	ll g = a[0];
	for(auto& e:a) {
		cin >> e;
		//cout << e <<' ' ;
		g = __gcd(g, e);
		//cout << g << ' ' ;
	}
	//cout << '\n';
	//cout << g << '\n';
	if (g != 1) {
		cout << "not coprime\n";
		return 0;
	}
	
	for (auto& p:primes) {
		bool f = 0;
		for (int j=0; j<n; j++) {
			if (a[j] < p) continue;
			if (a[j] % p == 0) {
				if (f == 1) {
					cout << "setwise coprime\n";
					return 0;
				}
				f = 1;
			}
		}
	}
	
	cout << "pairwise coprime\n";
	
	
	
	
	return 0;
}


