#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(int)(n); i++)

using namespace std;
using LL = long long;
using P = pair<int,int>;
const int Max_A = 1e6+5;
const int INF = 1e8;

int div[Max_A];

int main(){
	int N;
	cin >> N;
	vector<int> A(N);
	rep(i,N) cin >> A[i];
	rep(i,Max_A) div[i]=i;
	for(int i=2; i*i<Max_A; i++){
		if(div[i]==i){
			for(int j=2; j*i<Max_A; j++) div[j*i]=i;
		}
	}
	map<int,int> mp;
	rep(i,N){
		int a=A[i];
		vector<int> p;
		while(a!=div[a]){
			a/=div[a];
			int s=p.size()
			if(div[a]!=p[s-1]) p.emplace_back(div[a]);
		}
		rep(j,p.size()) mp[p[j]]++;
		if(a!=1) mp[a]++;
	}
	bool pairwise=true, setwise=true;
	for(auto itr:mp){
		int num=itr.second;
		if(num>=2) pairwise=false;
		if(num==N) setwise=false;
	}
	rep(i,N) if(A[i]==1) setwise=true;
	if(pairwise) cout << "pairwise coprime" << endl;
	else if(setwise) cout << "setwise coprime" << endl;
	else cout << "not coprime" << endl;

	return 0;
}