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



int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	ll n;
	cin >> n;
	vector<ll> v(n);

	
	for(int i = 0; i < n; i++){
		cin >> v[i];
	}
	ll g = v[0];

	for(int i = 1; i < n; i++){
		g = __gcd(g,v[i]);
	}

	ll bound = 1e6 + 5;
	int *arr = new int[bound];

	for(int i = 2; i < bound; i++){
		if(arr[i] != 0)
			continue;
		for(int j = 2*i; j < bound; j+= i){
			arr[j] = i;
		}
	}

	for(int i = 0; i < bound; i++){
		if(arr[i] == 0){
			arr[i] = i;
		}
	}
	
	map<ll,ll> mp;
	for(int i = 0; i < n; i++){
		ll val = arr[v[i]];
		//cout << v[i] << ":" << val << "\n";
		mp[val]++;
	}

	bool ok = 1;
	for(auto val : mp){
		if(val.second > 1){
			ok = 0;
			break;
		}
	}

	if(ok && g == 1){
		cout << "pairwise coprime\n";
	}
	else if(g == 1){
		cout << "setwise coprime\n";
	}
	else{
		cout << "not coprime\n";
	}
}