#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(3e5);
vi visited(3e5, 0);
/*

*/
void dfs(int n, int& cnt)
{
	for (auto i : adj[n])
	{
		if (!visited[i])
		{
			visited[i] = 1;
			cnt++;
			dfs(i, cnt);
		}
	}
}

int solve() {
	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], div = 2;
		while (x != 1)
		{
			if (x % div == 0)
			{
				if (mp[div] == 1)
				{
					flag = 1;
					break;
				}
				mp[div] = 1;
				while (x % div == 0)x /= div;
			}
			div++;
		}
		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;
}
