#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];
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
	}
	int g = a[0];
	for (int i = 1; i < n; ++i) {
		g = __gcd(g, a[i]);
	}

	if(g > 1) {
		cout << "not prime\n";
		return 0;
	}
	int cnt = 0;
	for (int i = 0; i < n; ++i) {
		if(a[i]%2 == 0)
			++cnt;
	}

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