#include <bits/stdc++.h>

using namespace std;

int n, x[1000005], cnt[1000005];
bool np[1000005];

int gcd(int a, int b) {
	while (a) {
		b %= a;
		swap(a, b);
	}
	return b;
}

int main() {
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d", x + i);
		cnt[x[i]]++;
	}
	int g = x[0];
	for (int i = 1; i < n; i++)
		g = gcd(g, x[i]);
	bool ok = 1;
	for (int i = 2; i < 1000005; i++)
		if (!np[i]) {
			int tot = 0;
			for (int j = i; j < 1000005; j += i) {
				tot += cnt[j];
				np[j] = 1;
			}
			if (tot > 1)
				ok = 0;
		}
	if (ok)
		puts("pairwise coprime");
	else if (g == 1)
		puts("setwise coprime");
	else
		puts("not coprime");
}