#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define eb emplace_back
#define mk make_pair
#define fi first
#define se second
#define mset(a, b) memset(a, b, sizeof(a))
#define DBG(x) cout << "[" << #x << "]: " << x << endl
using ll = long long;
using pii = pair<int, int>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#ifdef _WIN32
#define getchar_unlocked _getchar_nolock
#endif

template<class Ty> Ty randint(Ty a, Ty b) { return uniform_int_distribution<Ty>(a, b)(rng); }
template<class num> inline void rd(num& x) {
	char c, neg = 0; while(isspace(c = getchar_unlocked()));
	if(!isdigit(c)) neg = (c == '-'), x = 0;
	else x = c - '0';
	while(isdigit(c = getchar_unlocked())) x = (x << 3) + (x << 1) + c - '0';
	x = neg ? -x : x; }
template <class... Args> inline void rd(Args&... args) { (rd(args), ...); }

const int MAXN = 1e6 + 5, INF = 0x3f3f3f3f;

int cnt[MAXN];

int main() {
	int n; rd(n);

	int g = 0;
	for (int i = 1; i <= n; i++) {
		int x; rd(x);
		g = gcd(x, g);

		for (int j = 1; j * j <= x; j++) {
			if (x%j == 0) {
				cnt[j]++;
				if (j * j != x) cnt[x/j]++;
			}
		}
	}

	bool ans1 = true;
	for (int p = 2; p < MAXN; p++)
		if (cnt[p] > 1) ans1 = false;

	if (ans1) puts("pairwise coprime");
	else if (g == 1) puts("setwise coprime");
	else puts("not coprime");

}