#include <bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef long double ld;
#define size(a) int((a).size())
#define present(c, x) (c.find(x) != c.end()) 
#define printVerdict(verdict) cout << (verdict ? "yes": "no") << '\n'
#define printDecimal(d) printf("%.9f\n", d)
#define inrange(val, start, end) (val >= start && val <= end)
 
const int mod = 1e9 + 7; 
 
template <class T1, class T2, class T3> 
void printTuple(tuple<T1, T2, T3> t) { cout << get<0>(t) << " " << get<1>(t) << " " << get<2>(t) << '\n'; }
template <class T1, class T2>
void printPair(pair<T1, T2> p) { cout << p.first << " " << p.second  << '\n'; }
template <class T>
void printArray(vector<T> arr) { for (int i = 0; i<size(arr); i++) {cout << arr[i] << " ";} cout << '\n'; } 

map<int, int> cnt;

bool sieve(int maxVal) {
	vector<bool> is_prime(maxVal + 1, true);
	for (int i = 2; i<=maxVal; i++) {
		if (is_prime[i]) {
			int curr = 0;
			for (int j = i*2; j <=maxVal; j+= i) {
				is_prime[j] = false;
				if (present(cnt, j)) curr += cnt[j];
				if (curr > 1) return false;
			}
		}
	}
	return true;
}

int main() {
	std::ios_base::sync_with_stdio(false);
	cin.tie(0);
	int n, maxVal = 0; cin >> n;
	int a[n];
	for (int i = 0; i<n; i++) {
		cin >> a[i];
		maxVal = max(maxVal, a[i]);
		if (!present(cnt, a[i])) cnt[a[i]] = 1;
		else cnt[a[i]]++;
	}
	int curr_gcd = a[0];
	for (int i = 1; i<n; i++) curr_gcd = __gcd(curr_gcd, a[i]);
	if (curr_gcd != 1) cout << "not coprime" << '\n';
	else {
		bool pairwise = sieve(maxVal);
		cout << (pairwise ? "pairwise coprime" : "setwise coprime") << '\n';
	}
}

