#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <string>

#define FastIO 						\
		ios::sync_with_stdio(0); 	\
		cin.tie(NULL); 				\
		cout.tie(NULL);

using namespace std;

typedef long long ll;

template<typename T> gcd(T a, T b) {
	if (!b)
		return a;
	else
		return gcd(b, a % b);
}

void solve() {
	int n;
	cin >> n;
	int a[n] = {}, b[n + 1] = {};
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	int t = a[0];
	b[0] = a[0];
	for (int i = 1; i < n; i++) {
		b[i] = gcd(b[i - 1], a[i]);
		t = gcd(t, a[i]);
	}
	bool pc = 1;
	for (int i = 1; i < n; i++) {
		pc = pc && (b[i] == 1);
	}
	if (pc) {
		cout << "pairwise coprime\n";
	} else if (t == 1) {
		cout << "setwise coprime\n";
	} else {
		cout << "not coprime\n";
	}
}

int main() {
	FastIO;
	int n = 1;
	// cin >> n;
	while (n--) {
		solve();
	}
}
