#include <bits/stdc++.h>
#define rep(i,n) for(long long i = 0; i < (long long)(n); ++i)

using namespace std;
using ll = long long;

int main() {
	string ans = "pairwise";
	ll n;
	cin >> n;
	vector<ll> a(n);
	rep(i, n) cin >> a[i];
	sort(a.begin(), a.end());
	if (n < 79000) {
		rep(i, n)rep(j, i) if (__gcd(a[i], a[j]) != 1) ans = "setwise";
	}
	else ans = "setwise";
	ll x = a[0];
	rep(i, n) {
		x = __gcd(a[i], x);
	}
	if (x != 1) ans = "not";
	cout << ans << " " << "coprime" << endl;
	return 0;
}
