#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define dup(x,y) (((x)+(y)-1)/(y))
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
typedef pair<int, int> pii;
const double EPS = 1e-10;
const int INF = 1e9;
const ll LINF = 1e15;
const int MOD = 1000000007;
const double PI = acos(-1);
int dx[4] = {0,1,0,-1};
int dy[4] = {1,0,-1,0};

ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}

int main() {
	int n;
	cin >> n;
	vector<int> v(n);
	rep(i,n) cin >> v[i];

	vector<int> cnt(1e6 + 1, 0);
	for (int i = 0; i < n; i++) {
		int cur = v[i];
		for (int j = 2; j * j <= cur; j++) {
			if (!isp[j]) continue;
			if (cur % j == 0) {
				cnt[j]++;
				while (cur % j == 0) cur /= j;
			}
		}
		if (cur != 1) cnt[cur]++;
	}
	bool b = true;
	for (int i = 0; i < 1e6 + 1; i++) {
		if (cnt[i] >= 2) b = false;
	}
	if (b) {
		cout << "pairwise coprime" << endl;
	} else {
		int g = v[0];
		rep(i,n) g = gcd(g, v[i]);
		if (g == 1) cout << "setwise coprime" << endl;
		else cout << "not coprime" << endl;
	}
}
