#ifdef _DEBUG
#include "../../library/library/debug_template.cpp"
#define DMP(...) dump(#__VA_ARGS__, __VA_ARGS__)
#else
#define DMP(...) ((void)0)
#endif

#include <cassert>
#include <cstdio>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <numeric>
#include <algorithm>

using namespace std;
using lint = long long;
constexpr int MOD = 1000000007, INF = 1010101010;
constexpr lint LINF = 1LL << 60;

struct init {
	init() {
		cin.tie(nullptr); ios::sync_with_stdio(false);
		cout << fixed << setprecision(10);
	}
} init_;

int main() {

	int N;
	cin >> N;

	vector<int> A(N);
	for (int i = 0; i < N; i++) cin >> A[i];
	sort(A.begin(), A.end());

	vector<int> p(1000100);
	bool no = false;
	for (int i = 0; i < N; i++) {
		for (int j = 1; j * A[i] < 1000100; j++) {
			if (p[j * A[i]]) {
				if (!p[j]) {
					no = true;
					break;
				}
			}
			p[j * A[i]]++;
		}
	}

	int g = 0;
	for (int i = 0; i < N; i++) {
		g = gcd(g, A[i]);
	}

	if (!no) {
		cout << "pairwise coprime" << "\n";
	}
	else if (g == 1) {
		cout << "setwise coprime" << "\n";
	}
	else {
		cout << "not coprime" << "\n";
	}

	return 0;
}
