/*****************************************************
 *     created by: nayakashutosh9
 * "Winners Never Quit and Quitters Never Win".
*****************************************************/
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("Ofast")
using namespace __gnu_pbds;
using namespace std;
#define int long long int
#define endl '\n'
#define mod 1000000007
#define inf 1e18
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
const int N = 3000005;
/**********************************************************************************************/

vector<int> p;
void pre() {
	p.clear(); p.resize(N, -1);
	p[0] = 0; p[1] = 1;
	for (int i = 2; i < N; i++) {
		if (p[i] == -1) {
			for (int j = i; j < N; j += i) p[j] = i;
		}
	}
}

void solve() {
	pre();
	int n; cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++) cin >> a[i];
	int g = a[0];
	for (int i = 1; i < n; i++)
		g = __gcd(g, a[i]);
	if (g != 1) {
		cout << "not coprime\n";
		return;
	}
	unordered_set<int> vis;
	for (int i = 0; i < n; i++)
		vis.insert(p[a[i]]);
	if (vis.size() == n) cout << "pairwise coprime\n";
	else cout << "setwise coprime\n";
}

int32_t main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	int t = 1, z = 1;
	// cin >> t; cin.ignore();
	while (t--) {
		// cout << "Case #" << (z++) << ": ";
		// clock_t start = clock();
		solve();
		// clock_t end = clock();
		// cout << (end-start) << endl;
		//print execution time in ms
	}

	return 0;
}