#include <bits/stdc++.h>

using namespace std;

vector<int> v;
void go(){
	for(int i = 2; i < 1000; ++i){
		bool ok = true;
		for(int j = 2; j*j <= i; ++j){
			if(i%j==0){
				ok = false; break;
			}
		}
		if(ok) v.push_back(i);
	}
}


int main(){
	int n; cin >> n;
	int a[n]; cin >> a[0]; int t = a[0];
	for(int i = 1; i < n; ++i){
		cin >> a[i]; t = __gcd(t, a[i]);
	}
	if(t != 1){
		cout << "not coprime";
		return 0;
	}
	go();
	int n1 = v.size();
	vector<bool> check(1e6 + 1);
	bool ok = true;
	for(int i : a){
		if(!ok) break;
		for(int &j : v){
			if(i%j==0){
				if(check[j]){
					ok = false;
					break;
				} 
				check[j] = 1;
				while(i%j) i/=j;
			}
		}
		if(i>0) check[i] = 1;
	}
	if(ok) cout << "pairwise coprime";
	else cout << "setwise coprime";
}