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

#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define watch2(x,y) cout <<(#x)<<" is "<<(x)<<" and "<<(#y)<<" is "<<(y)<<"\n"
#define watch3(x,y,z) cout <<(#x)<<" is "<<(x)<<" and "<<(#y)<<" is "<<(y)<<" and "<<(#z)<<" is "<<(z)<<"\n"

#define ll long long
#define ff first
#define ss second
#define null NULL
#define all(c) (c).begin(),(c).end()
#define nl "\n"

#define ld long double
#define eb emplace_back
#define pb push_back
#define pf push_front
#define mod 1000000007

typedef vector<ll> vl;
typedef vector< vl > vvl;
typedef pair< ll, ll> pll;
typedef map< ll, ll> mll;

#define pie_value 3.14159265358979323846

int main() {

	// Use ctrl+shift+b ( second option )
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	freopen("error.txt" , "w" , stderr);
#endif

	unordered_map<ll, vector<ll>> mp;
	for (ll i = 2; i <= 100005; i++) {
		if (mp[i].size() == 0) {
			mp[i].pb(i);
			for (ll j = 2 * i; j <= 100005; j += i) {
				mp[j].pb(i);
			}
		} else {
			continue;
		}
	}

	// for (auto p : mp) {
	// 	cout << p.first << "--> ";
	// 	for (auto i : p.second) {
	// 		cout << i << ",";
	// 	} cout << nl;
	// }

	ll is_pairwise = 1;
	unordered_map<ll, ll> ump;
	ll n;
	cin >> n;

	ll a[n + 4] = {0};
	for (ll i = 1; i <= n; i++) {
		cin >> a[i];
	}

	// for (ll i = 1; i <= n; i++) {
	// 	for (auto el : mp[i]) {
	// 		cout << el << ",";
	// 	} cout << nl;
	// }

	for (ll i = 1; i <= n; i++) {
		for (auto el : mp[a[i]]) {
			if (ump[el] == 1) {
				is_pairwise = 0;
				break;
			} else {
				ump[el] = 1;
			}
		}
		if (is_pairwise == 0)
			break;
	}

	if (is_pairwise == 1) {
		cout << "pairwise coprime" << nl;
	} else {
		ll is_setwise = 1;
		ll ans = 0;
		for (ll i = 1; i <= n; i++) {
			ans = __gcd(ans, a[i]);
		}

		if (ans == 1) {
			cout << "setwise coprime" << nl;
		} else {
			cout << "not coprime" << nl;
		}
	}

	return 0;
}
