#include "bits/stdc++.h"
#define int long long int
#define pb push_back
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define vvi vector<vector<int>>
#define vi vector<int>
#define f first
#define s second
using namespace std;
const int mod = 1e9 + 7;
int logi(int n) {int p = 0; while (n / 2) {n = n / 2; p++;} return p;}
int poww(int x, int y) {int pro = 1; while (y) {if (y & 1)pro = ((pro % mod) * (x % mod) % mod); y = y >> 1; x = ((x % mod) * (x % mod) % mod);} return pro;}
int poww2(int x, int y) {int pro = 1; while (y) {if (y & 1)pro = pro * x; y = y >> 1; x = x * x;} return pro;}
bool isprime(int n) { if (n == 1) return false; for (int i = 2; i <= sqrt(n); i++) if (n % i == 0) return false; return true;}
vector<vector<int>> adj(3e6);
vi visited(3e6, 0);
vi prime(3e6, 1);
/*

*/
void sieve()
{
	prime[0] = prime[1] = 0;
	for (int i = 2; i <= 1000000; i++)
	{
		if (prime[i] && (int)i * i <= 1000000)
		{
			adj[i].push_back(i);
			for (int j = i + i; j <= 1000000; j += i)
			{
				prime[j] = 0;
				adj[j].push_back(i);
			}
		}
	}
}

int solve() {
	sieve();
	//for (auto it : adj[10]) cout << it << " ";
	int n;
	cin >> n;
	vector<int> v(n);
	for (int i = 0; i < n; i++)
	{
		cin >> v[i];
	}
	map<int, int> mp;
	int flag = 0;
	for (int i = 0; i < n; i++)
	{
		int x = v[i];
		for (auto it : adj[x])
		{
			if (mp[it])
			{
				flag = 1;
				break;
			}
			else mp[it] = 1;
		}
		if (flag == 1)
		{
			break;
		}
	}
	if (flag == 0)cout << "pairwise coprime";
	else
	{
		int gcd = v[0];
		for (int i = 1; i < n; i++)
		{
			gcd = __gcd(gcd, v[i]);
		}
		if (gcd == 1)cout << "setwise coprime";
		else cout << "not coprime";
	}
	return 0;
}
int32_t main() {
	/*#ifndef ONLINE_JUDGE
	    //for getting input from input.txt
	    freopen("input.txt","r",stdin);
	    //for writing output to output.txt
	    freopen("output.txt","w",stdout);
	#endif*/
	fast;
	int t = 1;
	//cin >> t;
	while (t--)
	{
		solve();
	}
	return 0;
}
