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

int max_n = 1e6 + 6;
vector<int> spf;

void sieve()
{
	spf.resize(max_n, 1);
	
	for(int num = 2; num < max_n; num++)
		spf[num] = num;

	for(int num = 2; num < max_n; num++)
	{
		if(spf[num] != num)
			continue;

		for(int mult = 2*num; mult < max_n; mult += num)
			spf[mult] = num;
	}
}

void solve()
{
	int n;
	cin >> n;

	vector<int> a(n);
	for(auto &ele : a)
		cin >> ele;

	vector<bool> present(max_n, false);
	bool first = true;

	for(int i = 0; i < n; i++)
	{
		int num = a[i];
		while(num != 1)
		{
			int pf = spf[num];
			if(present[pf] == true)
				first = false;
			
			present[pf] = true;
			while(num % pf == 0)
				num /= pf;
		}
	}
	
	int g = a[0];
	for(int i = 1; i < n; i++)
		g = __gcd(g, a[i]);

	if(first)
		cout << "pairwise coprime" << endl;
	else if(g == 1)
		cout << "setwise coprime" << endl;
	else
		cout << "not comprime" << endl;
}



int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	sieve();
	solve();
	return 0;
}
