#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 comp[MAXN];

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

	vector<int> primes;
	comp[1] = true;
	for (int i = 2; i < MAXN; i++) {
		if (comp[i]) continue;
		primes.push_back(i);
		for (int j = i + i; j < MAXN; j += i)
			comp[j] = true;
	}

	map<int, int> f;

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

		for (int p : primes) if (x%p == 0)
			f[p]++;
	}

	bool ans1 = true;
	for (auto p : f) if (p.se > 1) ans1 = false;

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

}