#include<bits/stdc++.h>

using namespace std;
using ll = long long;

class Osa_k {
private:
	int n;
	vector<int> factor;
public:
	Osa_k(int _n):n(_n) {
		factor.assign(n, 0);
		iota(factor.begin(), factor.end(), 0);
		for(int i = 2; i*i < n; i++) {
			if(factor[i] < i)continue;
			for(int j = i * i; j < n; j += i) {
				if(factor[j] == j)factor[j] = i;
			}
		}
	}

	//v < nが要求される
	vector<pair<int,int>> sieve(int v) {
		vector<pair<int,int>> ret;
		int base = factor[v];
		int cnt  = 0;
		while(v != 1) {
			if(base == factor[v]) cnt++;
			else {
				ret.emplace_back(base, cnt);
				base = factor[v];
				cnt = 1;
			}
			v /= factor[v];
		}
		ret.emplace_back(base, cnt);
		return ret;
	}


}fact(1000001);


int main()
{
	int n; cin >> n;
	vector<int> a(n);
	for(int i = 0; i < n; i++)cin >> a[i];
	vector<int> num(1000001);
	for(int i = 0; i < n; i++) {
		auto v = fact.sieve(a[i]);
		for(auto j : v)num[j.first]++;
	}
	int cnt = count_if(num.begin(), num.end(), [](int a){return a > 1;});
	int GCD = accumulate(a.begin(), a.end(), 0, [](int a, int b){return gcd(a, b);});
 
	if(cnt == 0) {
		cout << "pairwise coprime" << endl;
	} else if(GCD == 1) {
		cout << "setwise coprime" << endl;
	} else {
		cout << "not coprime" << endl;
	}	

}