#include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long ll;
typedef pair<ll,ll> P;
const ll mod=1000000007;
const ll LINF=1LL<<60;
const int INF=1<<30;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }


int main(){
	ll n;cin>>n;
	vector<ll> a(n);
	for(int i = 0; i < n; i++) {
		cin>>a[i];
	}
	vector<ll> product_a(n+ 1,1);
	for(int i = 0; i < n; i++) {
		product_a[i +1] = product_a[i] * a[n - i - 1];
		product_a[i + 1] %= mod;
	}
	// for(int i = 0; i < n+1; i++) {
	// 	cout << product_a[i] << endl;
	// }
	bool flag = false;
	for(int i = 0; i < n - 1; i++) {
		if (__gcd(product_a[n - i - 1],a[i]) != 1){
			// cout << "not pairwise" << endl;
			flag = true;
			break;
		}
	}
	if (!flag)cout << "pairwise coprime" << endl;
	else {
		ll setwise = a[0];
		for(int i = 1; i < n; i++) {
			setwise = __gcd(a[i],setwise);
		}
		if (setwise == 1){
			cout << "setwise coprime" << endl;
		}
		else{
			cout << "not coprime" << endl;
		}
	}
	return 0;
}