#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define irep(i, n) for (int i = (n); i >= 0; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1 << 25;
const ll MOD = 1e18+7;
ll a[int(1e6+10)]; 
int main() {
	int n;
	cin >> n;
	rep(i,n) cin >> a[i];
	sort(a,a+n);
	ll g = a[0];
	rep(i,n) g = __gcd(g, a[i]);

	if (g > 1) {
		cout << "not coprime" << endl;
		return 0;
	}
	
	ll pi = 1;
	ll lcm = 1;
	rep(i,n) {
		pi *= a[i];
		pi %= MOD;
		lcm = a[i] / __gcd(lcm,a[i]) * lcm;
		lcm %= MOD;
	}
	
	if (pi == lcm) cout << "pairwise coprime" << endl;
	else cout << "setwise coprime" << endl;

	return 0;
}