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

const int nm = 1e6;
int n, a[nm];
bool b[nm + 1], flag;

int main() {
	fill(b + 2, b + nm + 1, 1);

	for (int i = 2; i * i <= nm; ++i) {
		if (!b[i])
			continue;
		for (int j = i * 2; j <= nm; j += i)
			b[j] = 0;
	}

	cin >> n;
	for (int i = 0; i < n; ++i)
		cin >> a[i];

	flag = 1;
	for (int i = 2; i <= nm; ++i) {
		if (!b[i])
			continue;
		int c = 0;
		for (int j = 0; j < n; ++j)
			if (!(a[j] % i))
				++c;
		if (c > 1) {
			flag = 0;
			break;
		}
	}
	if (flag) {
		cout << "pairwise coprime" << endl;
		return 0;
	}

	int g = gcd(a[0], a[1]);
	for (int i = 2; i < n; ++i)
		g = gcd(g, a[i]);
	cout << (g == 1 ? "setwise coprime" : "not coprime") << endl;
}
