#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<int,int>
#define pii pair<int,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<int, set<int>>m;
	int n;
	cin >> n;
	vector<int>v(n);
	int g = 0;
	for (int i = 0; i < n; i++) {
		cin >> v[i];
		g = __gcd(g, v[i]);
		int got = v[i];
		for (int j = 2; j <= sqrt(got); j++) {
			if (got % j == 0) {
				while (got % j == 0) {
					m[j].insert(i);
					got = got / j;
				}
			}
		}
		if (got > 1)
			m[got].insert(i);
	}
	bool ok = false;
	for (auto k : m) {
		if (k.se.size() >= 2) {
			ok = true;
			break;
		}
	}
	if (!ok)
		cout << "pairwise coprime" << endl;
	else {
		if (ok && g == 1)
			cout << "setwise coprime" << endl;
		else
			cout << "not coprime" << endl;
	}
}