#include <bits/stdc++.h>
using namespace std;

using ll  = long long;
using ld  = long double;
using pii = pair<int,int>;

void solve(){
	constexpr int MAXN = 1e6;

	int n;
	cin >> n;

	vector<int> arr(n);
	for(auto& i : arr) cin >> i;

	bool pairwise = true;

	vector<bool> present(MAXN + 1, false);
	for(auto i : arr) present[i] = true;

	vector<bool> isPrime(MAXN + 1, true);
	for(int i = 2; i <= MAXN; ++i){
		if(not isPrime[i]) continue;

		int cnt = 0;
		for(int j = i; j <= MAXN; j += i){
			isPrime[j] = false;
			cnt += present[j];
		}

		if(cnt > 1) pairwise = false;
	}

	int g = 0;
	for(auto i : arr) g = __gcd(g, i);

	if(pairwise) cout << "pairwise coprime\n";
	else if(g == 1) cout << "setwise coprime\n";
	else cout << "not coprime\n";
}

signed main (void){
	// Fast_IO
	ios::sync_with_stdio(false);
	cin.tie(nullptr);

	// Set Fixed Notation (default sucks), High Precision for Floating-Point Output
	cout << fixed << setprecision(20);

	// Multiple TCs
	int tt = 1;
	// cin >> tt;
	while(tt--) solve();
}
