#include <bits/stdc++.h>
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define FSP(x) fixed << setprecision(x)
using namespace std;
using ll = long long;
constexpr ll INF = LLONG_MAX;
constexpr long double PI = acosl(-1);
void Yes() {cout << "Yes\n";}
void No() {cout << "No\n";}
void YES() {cout << "YES\n";}
void NO() {cout << "NO\n";}

#include <vector>
#include <functional>

/*	verified : 2020/07/17
		AOJ, Range Minimum Query (RMQ)
		http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=DSL_2_A
*/

template<typename T>
struct segment_tree {
	long long N;				// the size of V
	long long M;				// the number of leaves
	std::vector<T> V;			// Segment Tree, 1-indexed
	std::function<T(T, T)> OP;	// binary operation
	T ID;						// identity element op OP

	segment_tree(std::vector<T>& a, std::function<T(T, T)> f, T t) : OP(f), ID(t) {
		M = 1;
		while (M < a.size()) M *= 2;
		N = 2 * M;
		V.resize(N, ID);
		for (long long i = 0; i < a.size(); i++) V[M + i] = a[i];
		for (long long i = a.size(); i < M; i++) V[M + i] = ID;
		for (long long i = M - 1; i > 0; i--) {
			V[i] = OP(V[2 * i], V[2 * i + 1]);
		}
	}

	segment_tree() {}
	void init(std::vector<T>& a, std::function<T(T, T)> f, T t) {
		OP = f; ID = t;
		M = 1;
		while (M < a.size()) M *= 2;
		N = 2 * M;
		V.resize(N, ID);
		for (long long i = 0; i < a.size(); i++) V[M + i] = a[i];
		for (long long i = a.size(); i < M; i++) V[M + i] = ID;
		for (long long i = M - 1; i > 0; i--) {
			V[i] = OP(V[2 * i], V[2 * i + 1]);
		}
	}

	void point_update(long long i, T x) {
		i += M;
		V[i] = x;
		while (i / 2 < i) {
			i /= 2;
			V[i] = OP(V[2 * i], V[2 * i + 1]);
		}
	}

	T range_subfunc(
		long long cur_node, long long cur_left, long long cur_right,
		long long l, long long r
	) {
		if (cur_right <= l || r <= cur_left) return ID;
		if (l <= cur_left && cur_right <= r) return V[cur_node];
		long long mid = (cur_left + cur_right) / 2;
		return OP(
			range_subfunc(cur_node * 2, cur_left, mid, l, r),
			range_subfunc(cur_node * 2 + 1, mid, cur_right, l, r)
		);
	}

	T range_fold(long long l, long long r) {
		return range_subfunc(1, 0, M, l, r);
	}
};

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	//constexpr ll P = 1e9 + 7;
	//constexpr ll P = 998244353;

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

	ll x = a[0];
	for (ll i = 1; i < n; i++) x = __gcd(x, a[i]);
	if (x > 1) {
		cout << "not coprime" << endl;
		return 0;
	}

	auto f = [] (ll a, ll b) {
		if (a == -1) return b;
		if (b == -1) return a;
		return __gcd(a, b);
	};
	segment_tree<ll> sg(a, f, -1);
	for (ll i = 1; i < sg.M; i++) {
		if (sg.V[i] > 1) {
			if (sg.V[i * 2] != -1 && sg.V[i * 2 + 1] != -1) {
				cout << "setwise coprime" << endl;
				return 0;
			}
		}
	}
	cout << "pairwise coprime" << endl;
}