#include <bits/stdc++.h>
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define FSP(x) fixed << setprecision(x)
using namespace std;
using ll = long long;
constexpr ll INF = LLONG_MAX;
constexpr long double PI = acosl(-1);
void Yes() {cout << "Yes\n";}
void No() {cout << "No\n";}
void YES() {cout << "YES\n";}
void NO() {cout << "NO\n";}

#include <vector>

/*	verified : 2020/07/18
		AOJ, Disjoint Set: Union Find Tree
		http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=DSL_1_A
*/

struct union_find {
	long long N;					// the number of nodes
	long long M;					// the number of trees
	std::vector<long long> parent;	// parent[i] := the direct parent of i
	std::vector<long long> size;	// size[i] := the number of nodes in the tree containing i

	union_find(long long n) : N(n), M(n) {
		parent.resize(n, -1);
		size.resize(n, 1);
	}

	long long root(long long i) {
		if (parent[i] == -1) return i;
		else return parent[i] = root(parent[i]);
	}

	bool is_united(long long i, long long j) {
		return (root(i) == root(j));
	}

	// true : unite succeeded
	bool unite(long long i, long long j) {
		i = root(i); j = root(j);
		if (i == j) return false;
		if (size[i] < size[j]) std::swap(i, j);
		parent[j] = i;
		size[i] += size[j];
		M--;
		return true;
	}
};

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	//constexpr ll P = 1e9 + 7;
	//constexpr ll P = 998244353;

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

	ll x = a[0];
	for (ll i = 1; i < n; i++) x = __gcd(x, a[i]);
	if (x > 1) {
		cout << "not coprime" << endl;
		return 0;
	}

	sort(ALL(a));
	vector<ll> v(0);
	x = a[0];
	for (ll i = 1; i < n; i++) {
		if (__gcd(x, a[i]) > 1) {
			cout << "setwise coprime" << endl;
			return 0;
		}
		if (x <= 1e18 / a[i]) x *= a[i];
		else {
			v.push_back(x);
			x = a[i];
		}
	}
	v.push_back(x);

	ll m = v.size();
	for (ll i = 0; i < m - 1; i++) {
		for (ll j = i + 1; j < m; j++) {
			if (__gcd(v[i], v[j]) > 1) {
				cout << "setwise coprime" << endl;
				return 0;
			}
		}
	}
	cout << "pairwise coprime" << endl;
}