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

#define int long long
#define pb push_back
#define mp make_pair
#define endl "\n"
#define ss second
#define ff first

#ifndef ONLINE_JUDGE
#define debug(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){cerr << name << " : " << arg1 << endl;}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << "  ";
	__f(comma + 1, args...);}
#else
#define debug(...)
#endif

const int inf = 2e18;
const int ninf = -2e18;

map<int, int> m;

bool pf(int n) {
	for (int i = 2; i < sqrt(n) + 2; i++) {
		if (n % i == 0 && m[i] > 0) return 0;
		while (n % i == 0) {
			n /= i;
			m[i]++;
		}
		if (n == 1) break;
	}
	if (n > 1) m[n]++;
	
	return 1;
}

signed main() {

	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
 
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
		freopen("error.txt", "w", stderr);
	#endif

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

	int g = 0;
	for (int i = 0; i < n; i++) g = __gcd(g, v[i]);

	if (g > 1) cout << "not coprime" << endl;
	else {
		for (int i = 0; i < n; i++) {
			if (!pf(v[i])) {
				cout << "setwise coprime" << endl;
				return 0;
			}
		}
		cout << "pairwise coprime" << endl;
	}

	return 0;
}