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

#define V vector
typedef long long ll;
typedef unsigned long long ull;

typedef V<int> vi;
typedef V<ll> vll;
typedef V<string> vs;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define f(i,a) for(int i = 0 ; i < a ; i++)
#define fll(i,a) for(ll i = 0 ; i < a ;i++)
#define forab(i,a,b) for(int i = a ; i < b ; i++)
#define prec(x) cout<<fixed<<setprecision(x)
#define ff first
#define ss second

#define pb push_back
//#define mp make_pair
#define numberofdigits(x) floor(log10(x)) + 1

const ll mod = 1e9 + 7;

ll binpow(ll a, long long b) {
	ll res = 1;
	while (b > 0) {
		if (b & 1)
			res = (res * a);
		a = (a * a);
		b >>= 1;
	}
	return res;
}

vector<vector<int>> a;
vector<int> vis;

int dfs(int node) {
	vis[node] = 1;
	int ans = 1;
	for (auto child : a[node]) {
		if (vis[child] == 1) continue;

		ans += dfs(child);
	}
	return ans;
}

const int MAXN = 1e6 + 9;

int spf[MAXN];
map<int , int> mp;
void sieve()
{
	spf[1] = 1;
	for (int i = 2; i < MAXN; i++)
		spf[i] = i;
	for (int i = 4; i < MAXN; i += 2)
		spf[i] = 2;

	for (int i = 3; i * i < MAXN; i++) {

		if (spf[i] == i) {
			for (int j = i * i; j < MAXN; j += i)
				if (spf[j] == j)
					spf[j] = i;
		}
	}
}

void getFactorization(int x)
{
	int temp;
	while (x != 1) {
		temp = spf[x];
		if (x % temp == 0) {

			mp[spf[x]]++;
			x = x / spf[x];
		}
		while (x % temp == 0)
			x = x / temp;
	}
}

bool check(int x)
{
	int temp;
	while (x != 1) {
		temp = spf[x];

		if (x % temp == 0 && mp[temp] > 1)
			return false;
		mp[temp]--;
		while (x % temp == 0)
			x = x / temp;
	}
	return true;
}

void solve() {

	int n;
	cin >> n;

	int a[n];
	for (int i = 0 ; i < n ; i++) {
		cin >> a[i];

		getFactorization(a[i]);
	}

	int g = a[0];
	bool setwise = false , pairwise = false;

	for (int i = 1 ; i < n ; i++)
		g = __gcd(g , a[i]);

	if (g == 1) setwise = true;

	for (int i = 0; i < n ; i++) {

		int x = a[i];

		bool ok = true;

		ok = check(a[i]);

		if (ok)
		{
			pairwise = true;
			break;
		}
	}

	if (pairwise)
		cout << "pairwise coprime\n";
	else if (setwise)
		cout << "setwise coprime\n";
	else cout << "not coprime\n";
}

int main() {

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	sieve();
	int t = 1;
	//cin >> t;

	while (t--)
		solve();
	return 0;
}



