#include <bits/stdc++.h>

using namespace std;
const int maxn = 2000001;
int c[maxn], mark[maxn];
int gcd(int a, int b) 
{ 
    if (b == 0) 
        return a; 
    return gcd(b, a % b);  
      
} 
int main(){
	int n; cin >> n;
	assert(n >= 2);
	int a[n];
	memset(c, 0, sizeof c);
	bool not_pairwise = false;
	vector<int> v(n);
	cin >> v;
	

	
	for(int i = 0; i < n; i++) {
		c[v[i]]++;
	}
	
	int g = v[0];
	for(int i = 1; i < n; i++) {
		g = __gcd(v[i], g);
		
	}
	
	if(!not_pairwise)
	{
		memset(mark, 0, sizeof mark);
		for(int i = 2; i < maxn; i++) {
			if(mark[i]) continue;
			int cnt = 0;
			for(int j = i; j < maxn; j+=i) {
				if(c[j]) cnt+=c[j];
				mark[j] = 1;
			}	
			if(cnt > 1) {
				not_pairwise = true;
			}
		}
	}
	string ans = "";
	if(!not_pairwise ) {
		ans =  "pairwise coprime\n";
	}else {
		if(g == 1 ) {
			ans =  "setwise coprime\n";
		}else ans = "not coprime\n";
	}
	cout << ans << endl;

	
	return 0;
}
