#include <bits/stdc++.h>
#define rep(i,n) for(long long i = 0; i < (long long)(n); ++i)

using namespace std;
using ll = long long;

int main() {
	string ans = "pairwise";
	ll n;
	cin >> n;
	vector<ll> a;
	rep(i, n) {
		cin >> a[i];
		if (a[i] == 1) {
			a[n-1] = 100000000;
			i--;
			n--;
		}
	}
	sort(a.begin(), a.end());
	if (n < 79000) {
		vector<bool> ok(1000005, true);
		rep(i,n) {
			if (ok[a[i]] == false) ans = "setwise";
			else {
				for (ll j = 2; j * j <= a[i]; j++) {
					if (a[i] % j == 0) {
						if (ok[j] == true) {
							ll k = 1;
							while (j * k < 1000005) {
								ok[j * k] = false;
								k++;
							}
						}
					}
				}
				if (ok[a[i]] == true) {
					ll k = 1;
					while (a[i] * k < 1000005) {
						ok[a[i] * k] = false;
						k++;
					}
				}
			}
			if (ans == "setwise") i = n - 1;
		}
	}
	else ans = "setwise";
	ll x = a[0];
	rep(i, n) {
		x = __gcd(a[i], x);
	}
	if (x != 1) ans = "not";
	cout << ans << " " << "coprime" << endl;
	return 0;
}
