#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

bool cnt[1000005];

int main() {
	int n; cin >> n;
	vector<int> a(n);
	for (int& e : a) cin >> e;
	int t = a[0];
	for (int i = 1; i < n; ++i) t = gcd(t, a[i]);
	if (t != 1) {
		cout << "not coprime" << endl;
		return 0;
	}
	
	for (int i = 0; i < n; ++i) {
		int t = a[i];
		for (long long j = 2; j * j <= t; ++j) {
			if (t % j) continue;
			while (t % j == 0) t /= j;
			if (cnt[j]) {
				cout << "setwise coprime" << endl;
				return 0;
			}
			cnt[j] = true;
		}
		if (t != 1) {
			if (cnt[t]) {
				cout << "setwise coprime" << endl;
				return 0;
			}
			cnt[t] = true;
		}
	}
	cout << "pairwise coprime" << endl;

	return 0;
}