#include<bits/stdc++.h>
#define pii pair<int, int>
#define mp make_pair
#define ll long long
#define pb push_back
#define S second
#define F first
using namespace std;

const int N = 1e6 + 5;
int fl[N];
int n;
void seive() {
	for (int i = 100003; i >= 2; i--) {
		for (int j = 2 * i; j <= 100003; j = j + i) {
			fl[j] = i;
		}
	}
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	
	cin >> n;
	vector<int> a(n);
	
	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]);
	}

	seive();
	//for (int i = 2; i <= 100; i++) {
	//	cout << i << " " << fl[i] << '\n';
	//}
	set<int> st;
	set<int> :: iterator itr;
	int fg = 0;
	for (int i = 0; i < n; i++) {
		set<int> st1;
		st1.clear();
		if (a[i] == 1) continue;
		while (true) {
			if (fl[a[i]] == 0) { //cout << a[i] << " ";
				st1.insert(a[i]);
				break;
			}
			else {
				st1.insert(fl[a[i]]); //cout << fl[a[i]] << " ";
				a[i] = a[i] / fl[a[i]];
			}
		}

		for (itr = st1.begin(); itr != st1.end(); itr++) {
			if (st.find(*itr) != st.end()) {
				fg = 1;
				break;
			}
			else {
				st.insert(*itr);
			}
		}
		//cout << '\n';
	}
	
	if (fg == 0) {
		cout << "pairwise coprime\n";
	}
	else if (g == 1) {
		cout << "setwise coprime\n";
	}
	else {
		cout << "not coprime\n";
	}


	

}