#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);
	
	random_shuffle(all(vec));
	//sort(all(vec));
	
	//ll limit = 1e7;
	unordered_set<ll> s;
	
	//print(vec,0,N-1);
	bool t = true;
	for(int i = 0; i < N; i++){
		if(!t) break;
		
		for(ll j = 1; j*j <= vec[i]; j++){
			if(vec[i]%j == 0){
				ll f1 = vec[i]/j;
				ll f2 = j;
				
				//debug(f1);
				//debug(f2);
				if(s.find(f1) != s.end()){
					t = false;
					break;
				}
				if(s.find(f2) != s.end()){
					t = false;
					break;
				}
				
				s.insert(f1);
				if(f2 != 1)s.insert(f2);
			}
		}
	}
	
	//debug(t);
	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;
}
