// C++ implementation of the approach 
#include <bits/stdc++.h> 
using namespace std; 
# define rep(i,n) for(int i=0;i<n;++i)
# define gcd __gcd

#define MAXN 1000001 

int spf[MAXN]; 

int hash1[MAXN] = { 0 }; 

void sieve() 
{ 
	spf[1] = 1; 
	for (int i = 2; i < MAXN; i++) 
		spf[i] = i; 
	for (int i = 4; i < MAXN; i += 2) 
		spf[i] = 2; 
	for (int i = 3; i * i < MAXN; i++) { 
		if (spf[i] == i) { 
			for (int j = i * i; j < MAXN; j += i) 
				if (spf[j] == j) 
					spf[j] = i; 
		} 
	} 
} 

void getFactorization(int x) 
{ 
	int temp; 
	while (x != 1) { 
		temp = spf[x]; 
		if (x % temp == 0) { 
			hash1[spf[x]]++; 
			x = x / spf[x]; 
		} 
		while (x % temp == 0) 
			x = x / temp; 
	} 
} 

bool check(int x) 
{ 
	int temp; 
	while (x != 1) { 
		temp = spf[x]; 
		if (x % temp == 0 && hash1[temp] > 1) 
			return false; 
		while (x % temp == 0) 
			x = x / temp; 
	} 
	return true; 
} 


int main(){ 	
	int n,cnt=0;
	cin>>n;
	int a[n];
	int g=0;
	rep(i,n){
		cin>>a[i];
		g=gcd(g,a[i]);
	}
	sieve(); 

	for (int i = 0; i < n; i++) 
		getFactorization(a[i]); 

	// Checking the common prime factors 
	// with other numbers 
	for (int i = 0; i < n; i++){ 
		if (check(a[i])) 
			cnt++;
	}
	if(cnt==n){
		cout<<"pairwise comprime";
	}
	else if(g==1){
		cout<<"setwise comprime";
	}
	else cout<<"not coprime";
} 
