#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);
	vector<int> D(mxN, 0);
	isPrime[0] = false;
	D[0] = 1;
	isPrime[1] = false;
	D[1] = 1;
	for(int i = 2; i < mxN; ++i){
		if(isPrime[i]){
			D[i] = i;
			for(int j = i * i; j < mxN; j += i){
				isPrime[j] = false;
				D[j] = i;
			}
		}
	}
	map<int, int> mp;
	set<int> st;
	bool kr = false;
	for(int i = 0; i < n; ++i){
		if(st.find(a[i]) != st.end()){
			kr = true;
			break;
		}
		st.insert(a[i]);
		int k = a[i];
		while(D[k] != k){
			mp[D[k]]++;
			int p = D[k];
			while(k % p == 0)k /= p;
		}
		if(k > 1 and D[k] == k)mp[k]++;
	}
			
	bool pr = true;
	if(kr == false){
		for(auto it : mp){
			if(it.second > 1){
				pr = false;
				break;
			}
		}
	}else {
		pr = false;
	}
	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;
}
