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

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifndef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

map<int, int> m;
bool ok(int n) {
	if (n % 2 == 0) {
		m[2]++;
		if (m[2] >= 2) {
			return false;
		}
		while (n % 2 == 0) {
			n /= 2;
		}
	}
	for (int i = 3; i * i <= n; i += 2) {
		while (n % i == 0) {
			m[i]++;
			if (m[i] >= 2) {
				return false;
			}
			n /= i;
		}
	}
	if (n > 2) {
		m[n]++;
		if (m[n] >= 2) {
			return false;
		}
	}
	return true;
}
int main() {
	int n;
	cin >> n;
	vector<int> v(n);
	for (int &i : v) cin >> i;
	int count = 0;
	for (int i = 0; i < n; i++) {
		if (!ok(v[i])) {
			break;
		}
		count++;
	}
	if (count == n) {
		cout << "pairwise coprime\n";
		return 0;
	}
	int _gcd = v[0];
	for (int i = 1; i < n; i++) {
		_gcd = gcd(_gcd, v[i]);
	}
	if (_gcd == 1) {
		cout << "setwise coprime\n";
		return 0;
	}
	cout << "not coprime\n";
	return 0;
}
