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