#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i< (n); i++)
using ll = long long;
using namespace std;

int main(void){
	int N;
	cin >> N;

	vector<int> c(1'000'000);

	rep(i,N) {
		int a;
		cin >> a;
		if (a < 2) continue;
		int p = 2;
		while (a > 1) {
			if (a%p != 0) {
				p++;
				continue;
			}
			c[p]++;
			while (a%p == 0) a /= p;
		}
	}
	
	bool pc = true;
	bool sc = true;
	rep(i,1'000'000) {
		if (c[i] < 2) continue;
		pc = false;
		if (c[i] == N) {
			sc = false;
			break;
		}
	}

	if (pc) cout << "pairwise coprime" << endl;
	else if (sc) cout << "setwise coprime" << endl;
	else cout << "not coprime" << endl;
	
return 0;
}
