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

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';
	int uc = unique(a.begin(),a.end()) -a.begin();
	//cout << uc << '\n';
	if (g != 1LL || uc!=n) {
		cout << "not coprime\n";
		return 0;
	}
	map<int,int> mp1;
	for (auto& e:a) {
		//cout << mark[e] << ' ';
		mp1[mark[e]]++;
		if (mp1[mark[e]] > 1) {
			return cout << "setwise coprime\n",0;
		}
	}
	cout << "pairwise coprime\n";
	
	return 0;
}
