#include <bits/stdc++.h>
using namespace std;
int main() {
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
	#endif
	int n;	
	cin >> n;
	int a[n+5];
	int MAX = INT_MIN;
	unordered_map<int, int> mp;
	mp.clear();
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
		MAX = max(a[i], MAX);
		++mp[a[i]];
	}
	int g = a[0];
	for (int i = 1; i < n; ++i) {
		g = __gcd(g, a[i]);
	}

	if(g > 1) {
		cout << "not coprime\n";
		return 0;
	}
	int cnt = 0;
	for (int i = 0; i < n; ++i) {
		// cnt	
		for (int j = 1; (a[i] * j) <= MAX + 1; ++j) {
			if(mp[a[i] * j] > 0)
				++cnt;
		}
		// if(cnt > 1)
			// cout << 
		// for (int j = )
			// ++cnt;

	}

	if(cnt > n && g == 1) {
		cout << "setwise coprime\n";
		return 0;
	} else {
		cout << "pairwise coprime\n";
		return 0;
	}
	return 0;
}