#include <iostream>
#include <vector>
#include <numeric>
using namespace std;

int main()
{
	int n;
	cin >> n;
	vector<int> av(n);
	for (auto& a : av) {
		cin >> a;
	}

	bool pc = true;
	for (int i = 0; i < n - 1; ++i) {
		for (int j = i + 1; j < n; ++j) {
			if (gcd(av[i], av[j]) != 1) {
				pc = false;
				break;
			}
		}
		if (!pc) {
			break;
		}
	}

	bool sc = true;
	int allgcd = gcd(av[0], av[1]);
	for (int i = 2; i < n; ++i) {
		allgcd = gcd(allgcd, av[i]);
	}
	if (allgcd != 1) {
		sc = false;
	}

	if (pc) {
		cout << "pairwise coprime" << endl;
	}
	else if (sc) {
		cout << "setwise coprime" << endl;
	}
	else {
		cout << "not coprime" << endl;
	}


	return 0;
}