#include <bits/stdc++.h>
#define rep(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define debug(x) cout<<#x<<": "<<x<<endl
using namespace std;
using ll = long long;
const ll MOD = 1e9+7;
const ll LINF = LLONG_MAX;
const int INF = INT_MAX;
const double PI=acos(-1);
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int main(){
	ll n; cin >> n;
	vector<ll> a(n);
	rep(i,0,n) cin >> a[i];
	sort(all(a));
	reverse(all(a));
	vector<ll> div(1000010,-1);
	bool pairwise = true;
	rep(i,0,n){
		for(ll j = 1; j*j <= a[i]; j++){
			if(a[i] % j == 0){
				if((j != 1 && div[j] != -1) || div[a[i] / j] != -1){
					pairwise = false;
					continue;
				}else{
					div[j] = 1; 
					div[a[i] / j] = 1;
				}
			}
		}
		if(pairwise == false) continue;
	}
	bool not_coprime = false;
	ll gcd = a[0];
	rep(i,0,n){
		gcd = __gcd(a[i], gcd);
	}
	if(gcd > 1){
		not_coprime = true;
	}

	if(not_coprime == true){
		cout << "not coprime" << endl;
	}else if(pairwise){
		cout << "pairwise coprime" << endl;
	}else{
		cout << "setwise coprime" << endl;
	}
}