#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
ll M=1e9+7;


#define MAXN 1000001 

// Stores smallest prime factor for every number 
ll spf[MAXN]; 

// Hash to store prime factors count 
ll hash1[MAXN] = { 0 }; 
void sieve() 
{ 
	spf[1] = 1; 
	for (ll i = 2; i < MAXN; i++) 

		// Marking smallest prime factor for every 
		// number to be itself 
		spf[i] = i; 

	// Separately marking spf for every even 
	// number as 2 
	for (ll i = 4; i < MAXN; i += 2) 
		spf[i] = 2; 

	// Checking if i is prime 
	for (ll i = 3; i * i < MAXN; i++) { 

		// Marking SPF for all numbers divisible by i 
		if (spf[i] == i) { 
			for (ll j = i * i; j < MAXN; j += i) 

				// Marking spf[j] if it is not 
				// previously marked 
				if (spf[j] == j) 
					spf[j] = i; 
		} 
	} 
} 

// Function to store the prime factors after dividing 
// by the smallest prime factor at every step 
void getFactorization(ll x,ll i,bool &bb) 
{ 
	ll temp; 
	while (x != 1) { 
		temp = spf[x]; 
		if (x % temp == 0) { 

			// Storing the count of 
			// prime factors in hash 
			if(hash1[spf[x]]<i){
				bb=0;
				return;
			}
			hash1[spf[x]]=i; 
			
			x = x / spf[x]; 
		} 
		while (x % temp == 0) 
			x = x / temp; 
	} 
} 
 
int main()
{
	ll n
	cin>>n;
	vector<ll> vec(n+1,0);
	bool bb=1;
	for(ll i=1;i<=n;i++){
		cin>>vec[i];
		getFactorization(vec[i],i,bb);
		if(bb==0) break;
	}
	
	if(bb==1){
		cout<<"pairwise coprime"<<endl;
	}
	else{
		ll g=vec[1];
		for(ll i=2;i<=n;i++){
			g=__gcd(g,vec[i]);
		}
		if(g==1){
			cout<<"setwise coprime"<<endl;
		}
		else{
			cout<<"not coprime"<<endl;
		}
	}
	
}