#pragma GCC optimize("Ofast")  
#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
using namespace std;
#define IO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define int long long 
#define endl "\n"
#define all(x) (x).begin(),(x).end()
const int MOD = 1e9+7;
const int mxN = 2e6+3;

void solve(){
	int n;
	cin >> n;
	int a[n];
	for(int i = 0; i < n; ++i)cin >> a[i];
	//vector<bool> isPrime(mxN, true);
	//isPrime[0] = false;
	//isPrime[1] = false;
	//for(int i = 2; i < mxN; ++i){
		//if(isPrime[i]){
			//for(int j = i * i; j < mxN; j += i){
				//isPrime[j] = false;
			//}
		//}
	//}
	map<int, int> mp;
	for(int j = 0; j < n; ++j){
		int k = a[j];
		if(k % 2 == 0){
			mp[2]++;
			while(k%2 == 0)k /= 2;
		}
		int p = k;
		for(int i = 3; i * i <= p; i += 2){
			if(k == 1)break;
			if(k % i == 0){
				mp[i]++;
				while(k % i == 0)k /= i;
			}
		}
		if(k > 2)mp[k]++;
	}
	bool pr = true;
	for(auto it : mp){
		if(it.second > 1){
			pr = false;
			break;
		}
	}
	if(pr)cout << "pairwise coprime\n";
	else{
		int gd = a[0];
		for(int i = 1; i < n; ++i){
			gd = __gcd(gd, a[i]);
		}
		if(gd == 1)cout << "setwise coprime\n";
		else cout << "not coprime\n";
	}
}

int32_t main(){
	IO;
	
	int nT = 1;
	//cin >> nT;
	for(int i = 1; i <= nT; ++i)
		solve();
	return 0;
}
