#include<bits/stdc++.h>
using namespace std;

ll gcd(ll a, ll b) {
	if (b > a) return gcd(b, a);
	if (b == 0) return a;
	return gcd(b, a % b);
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif

	int n;
	cin >> n;
	vector<int> arr(n);
	for(int i = 0; i < n; i++) {
		cin >> arr[i];
	}
	map<int, int> cnt;
	for(int i = 0; i < n; i++) {
		int num = arr[i];
		if(num > 1) {
			int d = primes[num];
			cnt[d] += 1;
			while(num % d == 0) num /= d;
		}
	}
	int flag = 1;
	for(auto it : cnt) {
		if(it.second > 1) flag = 0;
	}
	if(flag) cout << "pairwise coprime";
	else {
		int gc = arr[0];
		for(int i = 1; i < n; i++) {
			gc = gcd(gc, arr[i]);
		}
		if(gc == 1) cout << "setwise coprime";
		else cout << "not coprime";
	}
	return 0;
}