//bayemirov
#include <bits/stdc++.h>

using namespace std;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

typedef long long ll;

#define pb push_back

const int N = 2e6;

int lp[N], a[N], gcd;
vector<int> p;
bool was[N];

bool factorize(int x, bool pairwise = 1) {
	vector<int> f;
	while (x > 1) {
		if (was[lp[x]]) pairwise = 0;
		f.pb(lp[x]);
		x /= lp[x];
	}
	for (auto x : f) was[x] = 1;
	return pairwise;
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
   for (int i = 2; i < N; i++) {
   	if (lp[i] == 0) {
   		lp[i] = i;
   		p.pb(i);
   	}
   	for (int j = 0; j < p.size() && p[j] <= lp[i] && p[j] * i < N; j++)
   		lp[p[j] * i] = p[j];
   }
   int n;
   cin >> n;
   for (int i = 1; i <= n; i++) {
   	cin >> a[i];
   	gcd = __gcd(gcd, a[i]);
   }
   if (gcd != 1) cout << "not coprime", exit(0);
   for (int i = n; i; i--) 
   	if (factorize(a[i]) && i != n) 
   	 cout << "pairwise coprime", exit(0);
   cout << "setwise coprime";
   return 0;
}