#include <bits/stdc++.h>
using namespace std;
#define int long long
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

int32_t main()
{
	//freopen("input.txt", "r", stdin);
	IOS;
	
	int n; cin >> n;
	int max_number = 0;
	vector<int> a(n);
	for(auto &x: a) {
		cin >> x;
		max_number = max(max_number, x);
	}

	if(n == 2) {
		if(__gcd(a[0], a[1]) != 1) {
			cout << "not coprime\n";
		} 
		else cout << "setwise coprime\n";
		return 0;
	}

	int overall_gcd = a[0];
	for(int i = 1 ; i < n ; i++) {
		overall_gcd = __gcd(overall_gcd, a[i]);
	}

	vector<int> s(max_number+1, true);
	unordered_set<int> hset;
	for(auto x: a) hset.insert(x);
	bool flag = false;

	for(int i = 2 ; i*i <= max_number ; i++) {
		if(!s[i]) continue;
		int count = 0;
		for(int j = 2*i ; j <= max_number ; j += i) {
			s[j] = false;
			if(hset.find(j) != hset.end()) ++count;
		}
		if(count >= 2) {
			flag = true;
			break;
		}
	}

	if(!flag) {
		cout << "pairwise coprime\n";
	}
	else {
		if(overall_gcd == 1) {
			cout <<  "setwise coprime\n";
		}
		else {
			cout << "not coprime\n";
		}
	}
	
	return 0;
}