#include <bits/stdc++.h>
#define len(a) a.size()
#define pb push_back
#define mkp make_pair
#define F first
#define S second
#define all(a) a.begin(), a.end()
using namespace std;
#define newline cout<<"\n";
#define fine cout<<"FINE"; newline
#define debug(x) cout<<"x: "<<x;newline
#define rep(i,a,b) for (long long int i=a; i<b; i++)
typedef long long int ll;
typedef vector<vector<vector<ll>>> vvvi;
typedef vector<vector<ll>> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<ll> vi;
typedef vector<pair<ll, ll>> vp;
typedef pair<ll, ll> pll;
ll inf = 1000000000000000000;
ll mod = 1000000007;
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
	//----------------------------------
	ll n;
	cin>>n;
	vi lis(n);
	rep(i, 0, n) cin>>lis[i];
	map<ll, ll> primes;
	ll l = 1000000;
	rep(i, 2, l+1){
		ll f = 1, j = 2;
		while (j*j <= i){
			if (i%j == 0){ f = 0; break;}
			j++;
		}
		if (f) primes[j] = 0;
	}
	ll g = lis[0], f = 1;
	for (auto x: lis){
		g = __gcd(g, x);
		for (auto itr = primes.begin(); itr != primes.end(); itr++){
			if (x%(*itr).F == 0 and (*itr).S != 0) {f = 0; break;}
			else if (x%(*itr).F == 0 and (*itr).S == 0) primes[(*itr).F] = 1;
		}
		if (f) break;
	}
	if (f) cout<<"pairwise coprime";
	else if (g == 1) cout<<"setwise comprime";
	else cout<<"not coprime";
	return 0;
}