//include
//------------------------------------------
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>

#include <numeric>
#include <utility>
#include <complex>

#include <sstream>
#include <iostream>
#include <iomanip>

#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <ctime>

// namespace
using namespace std;

// type alias
using ll = long long;
using ull = unsigned long long;
using comp = complex<double>;

// constant
static const ll MOD = 1000000007LL;
static const double PI = 3.14159265358979323846;

// conversion
inline ll toint(string s) { ll v; istringstream sin(s); sin >> v; return v; }
template<class t> inline string tostring(t x) { ostringstream sout; sout << x; return sout.str(); }

// print
#define RET(x) return cout << x << endl, 0;

// for loop
#define REP(i, a, b) for ((i) = (ll)(a);(i) < (ll)(b);(i)++)
#define REPD(i, a, b) for (ll i = (ll)(a);(i) < (ll)(b);(i)++)
#define REPI(v, vs) for (auto& v : vs)

//debug
#ifdef LOCAL_ENV
#define DUMP(x)  cerr << #x << " = " << (x) << endl
#define DEBUG(x) cerr << #x << " = " << (x) << " (l" << __LINE__ << ")" << " " << __FILE__ << endl
#else
#define DUMP(x)
#define DEBUG(x)
#endif

#define MAX_VALUE 9223372036854775807LL

template <ull N, class T, class... Args, std::enable_if_t<N == 0, int> = 0>
auto make_multiple_vector(Args... args) {
    return T(args...);
}

template <ull N, class T, class... Args, std::enable_if_t<N != 0, int> = 0>
auto make_multiple_vector(ull size, Args... args) {
    using value_type = std::decay_t<decltype(make_multiple_vector<N - 1, T>(args...))>;
    return vector<value_type>(size, make_multiple_vector<N - 1, T>(args...));
}

// computational complexity: o(log(max(a, b))) 
inline ull get_gcd(ull a, ull b)
{
	if (b == 0)
	{
		return a;
	}
	return get_gcd(b, a % b);
}

int solve() {
	ll N, N_;
	cin >> N;
	N_ = N;

	vector<ll> As;
	ll a;
	REPD(i, 0, N_) {
		cin >> a;
		if (a == 1) --N;
		else As.emplace_back(a);
	}

	if (N <= 1) RET("pairwise coprime");

	sort(As.begin(), As.end());
	ll max_A = *max_element(As.begin(), As.end());

	ll gcd = get_gcd(As[0], As[1]);
	REPD(i, 2, N) gcd = get_gcd(gcd, As[i]);

	if (gcd != 1LL) {
		if (N == N_) {RET("not coprime");}
		else {RET("setwise coprime");}
	}

	vector<bool> exist_a(max_A + 1, false);
	ll prev_a = -1;
	REPD(i, 0, N) {
		if (As[i] == prev_a) RET("setwise coprime");
		exist_a[As[i]] = true;
		prev_a = As[i];
	}

	ll sqrt_A;
	REPD(i, 0, max_A) {
		if (i * i <= max_A) {
			sqrt_A = i;
		}
		else break;
	}
	vector<bool> is_prime(max_A + 1, true);
	for (ll p = 2; p <= min(sqrt_A, max_A); ++p) {
		if (!is_prime[p]) continue;
		ll multiple_count = 0;
		for (ll i = 1; p * i <= max_A; ++i) {
			is_prime[p * i] = false;
			if (exist_a[p * i]) ++multiple_count;
		}
		if (multiple_count >= 2) RET("setwise coprime");
	}

	RET("pairwise coprime");

	return 0;
}

//main function
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	solve();
	// ll t;
	// cin >> t;
	// REPD(i, 0, t) solve();

	return 0;
}
