#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define irep(i, n) for (int i = (n); i >= 0; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1 << 25;
const int A = 1e6+5;
int a[A], c[A]; 
int main() {
	int n;
	cin >> n;
	
	rep(i,n) {
		cin >> a[i];
		c[a[i]]++;
	}

	int g = 0;
	rep(i,n) g = __gcd(g, a[i]);

	if (g > 1) {
		cout << "not coprime" << endl;
		return 0;
	}
	
	for (int i = 2; i < A; i++)
	{
		int cnt = 0;
		if (c[i] == -1) continue;
		for (int j = i; j < A; j += i)
		{
			//if (c[j] == -1) continue;
			cnt += c[j];
			c[j] = -1;
		}
		if (cnt > 1) {
			cout << "setwise coprime" << endl;
			return 0;
		}
	}
	cout << "pairwise coprime" << endl;
	return 0;
}
