// Author : Mohamed sameh
#include <bits/stdc++.h>
typedef long long ll ;
#define pb push_back
#define f first
#define s second
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define SZ(a) (int)a.size()
#define Flush fflush(stdout);
using namespace std ;
const int N = 1e6+9;
int a[N], n;
int sieve[N];
int factors[N];
int main()
{
	sieve[0] = sieve[1] = 1;
	for (int i = 2; i < N; i++)
	{
		for (int j = i; j < N; j+=i)
		{
			if (sieve[j] == 0)sieve[j] = i; 
			sieve[j] = min(i, sieve[j]); 
		}
	}
	cin >> n;
	int g = 0;
	for (int i = 0; i < n; i++)cin >> a[i], g = __gcd(g, a[i]);
	for (int i = 0; i < n; i++)
	{
		while(a[i] != 1)
		{
			int cur = sieve[a[i]];
			factors[ cur ]++;
			while(a[i] % cur == 0)a[i]/=cur; 
		}
	}
	int mx = 0;
	int ones = 0;
	for (int i = 2; i < N; i++)mx = max(mx, factors[i]), ones += (factors[i] == 1);
	if (mx <= 1)
	{
		cout <<"pairwise coprime\n"; 
	}else 
	{
		if (mx >= n-1 && g == 1)
		{
			cout <<"setwise coprime\n";
		}else 
		cout <<"not coprime\n";
	}
}
