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

#define N 1000050 
#define ll long long
ll int lpf[N], mobius[N]; 

void least_prime_factor() 
{ 
	for (ll int i = 2; i < N; i++) 
 
		if (!lpf[i]) 

			for (ll int j = i; j < N; j += i) 

				if (!lpf[j]) 
					lpf[j] = i; 
} 
void Mobius() 
{ 
	for (ll int i = 1; i < N; i++) { 

		if (i == 1) 
			mobius[i] = 1; 
		else { 

			if (lpf[i / lpf[i]] == lpf[i]) 
				mobius[i] = 0; 

			else
				mobius[i] = -1 * mobius[i / lpf[i]]; 
		} 
	} 
} 

ll int gcd_pairs(ll int a[], ll int n) 
{ 
	ll int maxi = 0; 

	ll int fre[N] = { 0 }; 

	for (ll int i = 0; i < n; i++) { 
		fre[a[i]]++; 
		maxi = max(a[i], maxi); 
	} 

	least_prime_factor(); 
	Mobius(); 

	ll int ans = 0; 

	for (ll int i = 1; i <= maxi; i++) { 
		if (!mobius[i]) 
			continue; 

		ll int temp = 0; 
		for (ll int j = i; j <= maxi; j += i) 
			temp += fre[j]; 

		ans += temp * (temp - 1) / 2 * mobius[i]; 
	} 

	return ans; 
} 

int main() 
{ 
	ll int n;
	cin>>n;
	ll int a[n];
	for(ll int i=0;i<n;i++)
	cin>>a[i];
	ll int g=__gcd(a[0],a[1]);
	for(ll int i=2;i<n;i++)
	g=__gcd(g,a[i]);
	//cout << gcd_pairs(a, n); 
	if(gcd_pairs(a,n)==0){
		if(g==1)
		cout<<"setwise coprime";
		else
		cout<<"not coprime";
	}
	else{
		if(gcd_pairs(a,n)==((n*(n-1))/2))
		cout<<"pairwise coprime";
		else
		cout<<"not coprime";
	}
	return 0; 
} 
