#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
 
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
 
typedef long long ll;
typedef vector<int> vi;
typedef unsigned long ul;
typedef vector<ll> vl;
typedef pair<int,int> pi;
typedef vector<pi> vpi;
typedef set<int> si;
typedef multiset<int> mi;
 
const ll INF = 1e18;
const int MOD = 1e9+7;

int gcd (int a, int b) {
    if (b == 0) return a;
    else return gcd (b, a % b);
}

int main() {
	
	cin.tie(NULL);
	ios_base::sync_with_stdio(false);
	
	int n;
	cin >> n;
	vi v(n), g;
	for(auto&q: v) cin >> q;
	
	bool pairwise=true;
	bool gcd1=false;
	
	for(int i=0; i<n; ++i) {
		for(int j=i+1; j<n; ++j) {
			int a=gcd(v[i],v[j]);
			if(a==1) gcd1=true;
			else pairwise=false, g.pb(a);
		}
	}
	
	if(pairwise) cout << "pairwise coprime\n";
	else if(gcd1) cout << "setwise coprime\n";
	else {
		bool setprime=true;
		for(int i=0; i<g.size() && setprime; ++i) {
			for(int j=i+1; j<g.size() && setprime; ++j) {
				int a=gcd(g[i],g[j]);
				if(a!=1) setprime=false;
			}
		}
		if(setprime) cout << "setwise coprime\n";
		else cout << "not coprime\n";
	}
	
	return 0;
}
