#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define all(x) x.begin(),x.end()
#define rep(i,j,n) for (long long i = j; i < (long long)(n); i++)
#define _GLIBCXX_DEBUG
const ll MOD = 1000000007;
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; }
//(a+b-1)/b
//priority_queue<ll, vector<ll>, greater<ll>> q;


signed main(){
	//cout << fixed << setprecision(10);
	ll n; cin >> n;
	ll sum_gcd;
	ll m = 0;
	map<ll,ll> mp;
	bool ans = 1;
	vector<bool> vec(1001000,false);
	rep(i,0,n){
		ll a; cin >> a;
		if(mp[a] > 0){
			cout << "not coprime" << endl;
			return 0;
		}
		vec[a] = 1;
		if(i == 0)sum_gcd = a;
		else sum_gcd = __gcd(a,sum_gcd);
		chmax(m,a);
	}
	for(ll i = 2;i <= m;i++){
		ll cnt = 0;
		ll j = i;
		bool ok = true;
		while(j <= m){
			if(vec[j])cnt++;
			if(cnt > 1){
				ok = 0;
				break;
			}
			j += i;
		}
		if(!ok){
			ans = 0;
			break;
		}
	}
//	cout << sum_gcd << endl;
	if(ans)cout << "pairwise coprime" << endl;
	else if(sum_gcd == 1)cout << "setwise coprime" << endl;
	else cout << "not coprime" <<endl;


	return 0;
}