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

int main(){
	ll n;
	cin >> n;
	vector<ll> a(n);
	map<ll,int> mp;
	ll gcd = 0;
	rep(i,n){
		cin >> a[i];
		gcd = __gcd(gcd, a[i]);
		ll temp = a[i];
		for (ll i = 2; i*i < temp; ++i) {
			if(temp % i) continue;
			mp[i]++;
			while(temp % i){
				temp /= i;
			}
		}
		if(temp != 1) mp[temp]++;
	}
	bool flag = false;
	for(auto p: mp){
		if(p.second >= 2) flag = true;
	}
	if(gcd >= 2){
		cout << "not coprime" << endl;
	} else if (flag){
		cout << "setwise coprime" << endl;
	}else{
		cout << "pairwise coprime" << endl;
	}
    return 0;
}