#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define ll long long
#define pii pair<int,int>
#define INF 1000000000

ll n, a[1000001];

bool pairwise() {
	for (ll i = 0; i < n; i++) {
		for (ll j = i + 1; j < n; j++) {
			if (__gcd(a[i], a[j]) > 1)
				return false;
		}
	}
	return true;
}

bool setwise() {
	ll res = a[0];
	for (ll i = 1; i < n; i++)
		res = __gcd(res, a[i]);
	return res == 1LL;
}

void test_case()
{
	cin >> n;

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

	if (pairwise()) {
		cout << "pairwise coprime";
	}
	else if (setwise()) {
		cout << "setwise coprime";
	} else {
		cout << "not coprime";
	}
}


int main()
{
	fastio
	// int t;
	// cin >> t;
	// while (t--)
	test_case();
}
