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

#define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define deb(x)	cout << #x << " " << x << endl;

#define N 1000001

typedef long long int ll;

vector<int> findAllPrimes() {
	bool is_comp[N] = {0};
	vector<int> p;

	for (int i = 2; i < N; i++) {
		if (is_comp[i])
			continue;

		p.push_back(i);
		for (int k = 2; i*k < N; k++)
			is_comp[i*k] = true;
	}

	return p;
}

int main() {

	IOS

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

	int g = a[0];
	for (int i = 1; i < n && g > 1; i++)
		g = __gcd(g, a[i]);

	if (g > 1) {
		cout << "not coprime";

	} else {
		vector<int> prime = findAllPrimes();
		map<int, int> mp;
		bool setws = false;

		for (int i = 0; i < n && !setws; i++) {
			for (int j = 0; j < prime.size() && prime[j] <= a[i] && !setws; j++) {
				if (a[i] % prime[j] == 0) {
					mp[prime[j]]++;
					if (mp[prime[j]] == 2) {
						setws = true;
						break;
					}

					while (a[i] % prime[j] == 0)
						a[i] /= prime[j];
				}
			}
		}

		cout << (setws ? "setwise coprime" : "pairwise coprime");

	}

	return 0;
}