#include <bits/stdc++.h>
using namespace std;
 
#define MOD (1000000000+7)
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define all(x) x.begin(), x.end()
#define print(vec,l,r) for(int i = l; i <= r; i++) cout << vec[i] <<" "; cout << endl;
#define forf(i,a,b) for(int i = (a); i < (b); i++)
#define forr(i,a,b) for(int i = (a); i > (b); i--)
#define input(vec,N) for(int i = 0; i < (N); i++) cin >> vec[i];
#define debug(x) cout << #x << "= " << x<< endl;
// template starts
typedef long long int ll;
 
// template ends here
 
string a = "pairwise coprime";
string b = "setwise coprime";
string c = "not coprime";
 
void solve(){
	// code starts from here
	srand(time(0));
	int N;
	cin >> N;
	vector<ll> vec(N);
	input(vec,N);
 
	
	ll limit = 1e6;
	bool t = false;
	
	set<pair<int,int>> s;
	while(limit--){
		int i1 = rand()%N;
		int i2 = rand()%N;
		
		if(i1 > i2) swap(i1,i2);
		
		while(i1 == i2 || s.find(mp(i1,i2)) != s.end()){
			i1 = rand()%N;
			i2 = rand()%N;
			if(i1 > i2) swap(i1,i2);
		}
		
		if(__gcd(vec[i1],vec[i2]) != 1){
			t = true;
			break;
		}
	}
	
	if(t){
		ll g = vec[0];
		for(int i = 1; i < N; i++){
			g = __gcd(g,vec[i]);
		}
		if(g == 1) cout << b << endl;
		else cout << c << endl;
	}
	else cout << a << endl;
}
 
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
 
	int T;
	T = 1;
	while(T--){
		solve();
	}
 
	return 0;
}
