#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double db;
#define endl '\n'
#define fi first
#define se second
#define pi pair<ll,ll>
#define pii pair<ll,pi>
#define pb push_back
#define mk make_pair
int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	unordered_map<ll, set<ll>>m;
	ll n;
	cin >> n;
	vector<ll>odd, even;
	vector<ll>v(n);
	ll g = 1;
	bool ok = false;
	for (ll i = 0; i < n; i++) {
		cin >> v[i];
		g = __gcd(g, v[i]);
		if (v[i] % 2 == 0) {
			even.pb(v[i]);
			if (even.size() >= 2) {
				ok = true;
			}
		} else {
			odd.pb(v[i]);
		}
	}
	if (!ok) {
		for (ll i = 0; i < ll(odd.size()); i++) {
			ll got = odd[i];
			for (ll j = 2; j <= sqrt(got); j++) {
				if (got % j == 0) {
					while (got % j == 0) {
						m[j].insert(i);
						got = got / j;
						if (m[j].size() >= 2) {
							ok = true;
							break;
						}
					}
				}
				if (ok)break;
			}
			if (got > 1)
				m[got].insert(i);
			if (ok)break;
		}
	}
	if (!ok)
		cout << "pairwise coprime" << endl;
	else {
		if (ok && g == 1)
			cout << "setwise coprime" << endl;
		else
			cout << "not coprime" << endl;
	}
}