#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;
	}
	
	map<int, int> p;
	rep(i,n) {
		int x = a[i];
		for (int j = 2; j*j <= a[i]; j++)
		{
			if (x % j != 0) continue;
			if (p[j] > 0) {
				cout << "setwise coprime" << endl;
				return 0;
			}
			p[j] = 1;
			while(x % j == 0) x /= j; 
		}
	}
	cout << "pairwise coprime" << endl;
	return 0;
}