#include<iostream>
#include<bits/stdc++.h>
using namespace std;

#define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define deb(x)	cout << #x << " " << x << endl;

typedef long long int ll;

vector<int> findAllPrimes(int N) {
	bool is_comp[N] = {0};
	vector<int> p;

	for (int i = 2; i*i < N; i++) {
		if (is_comp[i])
			continue;

		p.push_back(i);
		for (int k = 2; i*k < N; k++)
			is_comp[i*k] = true;
	}

	for (int x: p)
		cout << x << ", ";
	cout << endl;

	return p;
}


vector<int> get_factors(int n) {
	// deb(n);

	vector<int> f;
	if (n%2 == 0) {
		f.push_back(2);
		while (n%2 == 0)
			n /= 2;
	}

	for (int i = 3; i*i <= n; i+=2) {
		if (n%i == 0) {
			f.push_back(i);
			while (n%i == 0)
				n /= i;
		}
	}

	// for (int x: f)
	// 	cout << x << ", ";
	// cout << endl;

	return f;
}

int main() {

	IOS

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

	int g = a[0];
	for (int i = 1; i < n && g > 1; i++)
		g = __gcd(g, a[i]);

	if (g > 1) {
		cout << "not coprime";

	} else {
		unordered_set<int> st;
		bool setws = false;

		for (int i = 0; i < n && !setws; i++) {
			for (auto &x: get_factors(a[i])) {
				if (st.find(x) != st.end()) {
					setws = true;
					break;
				}

				st.insert(x);
			}
		}	

		cout << (setws ? "setwise coprime" : "pairwise coprime");

	}

	return 0;
}