#include <bits/stdc++.h>
#define s second
#define f first
#define pb push_back
#define endl '\n'
using namespace std;


typedef long long ll;
typedef pair<int,int> pii;

const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fLL;
const int MAX = 1e6 + 10;

vector<int> primes;
vector<bool> isp(MAX, 1);

void sieve(){

	for(int i = 2; i < MAX ; ++i){
		if(!isp[i]) continue;

		primes.pb(i);

		for(int j = 2; j*i < MAX; j++)
			isp[i*j] = 0;
	} 

}

int main(){
//	ios_base::sync_with_stdio(0);
//	cin.tie(0);

	sieve();

	int N;
	cin >> N;

	vector<int> V(N);

	for(int i = 0; i < N; i++) cin >> V[i];

	if(N == 2){
		bool ans = (__gcd(V[0],V[1]) == 1);
		cout << (ans ? "pairwise coprime" : "not coprime") << endl;
		return 0;
	}

	vector<unordered_set<int>> DIV(N);
	vector<int> F((int)1e6 + 10,0);
	unordered_set<int> GG;

	bool pc = 1;
	
	for(int i = 0; i < N; i++){

		for(int j = 0; (ll)primes[j]*primes[j] <= (ll)V[i]; j++){
			if(!(V[i] % primes[j])){
				DIV[i].insert(j);
				while(!(V[i] % primes[j])) V[i] /= primes[j];
				if(i && F[j]) pc = 0;
				F[j]++;
				GG.insert(j);
			}
		}

		auto it = lower_bound(primes.begin(), primes.end(), V[i]);
		if(it != primes.end() && *(it) == V[i]){
			int j = it - primes.begin();
			DIV[i].insert(j);
			if(i && F[j]) pc = 0;
			F[j]++;
			GG.insert(j);
		}

//		cout << V[i] << ":\n";
//		for(auto x : DIV[i]) cout << x << endl;

	}

	if(pc){
		cout << "pairwise coprime\n";
		return 0;
	}
	
	bool sc = 0;

	for(auto x : GG){
		bool ruim = 1;
		for(int i = 0; i < N; i++){	
			ruim &= DIV[i].count(x);
		}
		sc |= ruim;
	}

	cout << (!sc ? "setwise coprime" : "not coprime") << endl;

	return 0;
}
