/*******************************************************************
 * 		Author : yash1402_										   *
 ******************************************************************/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<int> vi;
typedef pair<int,int> pi;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
typedef vector<bool> vb;

vb prime(10e6+1);

void solve() {
	int n;
	cin >> n;
	vi v(n);
	for(auto &i:v) cin >> i;
	string ans = "pairwise coprime";
	
	int mp[n+1] = {0};
	
	for(int i=0;i<n;i++) {
		for(int j=2;j*j<=v[i];j++) {
			if(v[i]%j==0) {
				mp[j]++;
				if(mp[j] >= 2) {
					ans = "setwise coprime";
				}
				if(mp[j] >= n) {
					ans = "not coprime";
					break;
				}
			}
		}
	}
	
	cout << ans << "\n";
	
	
}

int main() {
	ll T=1;
	//cin >> T;
	
	//cout << "seieve started" << endl;
	fill(prime.begin(),prime.end(),true);
	prime[0] = prime[1] = true;
	for(int i=2;i*i<=10e6;i++) {
		for(int j=i*i;j<=10e6;j+=i) {
			prime[j] = false;
		}
	}
	//cout << "seieve ended" << endl;
	
	//for(int i=0;i<=100;i++) {
		//if(prime[i]) cout << i << " ";
	//}
	
	//cout << endl;
	
	while(T--) {
		solve();
	}
}

