#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
	int n;
	cin >> n;
	vector<int> a(n);
	rep(i,n) cin >> a[i];
	vector<int> d(1000000,0);
	rep(i,n) d[a[i]]=1;
	auto iter= max_element(a.begin(),a.end());
	int mx = *iter;
	bool pok = true;
	for (int i=2;i <= mx;i++) {
		int sum = 0;
		for (int j=0;j <= mx;j+=i)
			sum += d[j];
		if (sum > 1) {
			pok = false;
			break;
		}
	}
	if (pok) {
		cout << "pairwize coprime" << endl;
		return 0;
	}
	int x = a[0];
	for (int i=1;i < n && x != 1; i++)
		x = gcd(a[i], x);
	if (x == 1) cout << "setwize coprime" << endl;
	else cout << "not coprime" << endl;
	return 0;
}