#include<bits/stdc++.h>
 
using namespace std;
 
bool prime[1000006];
vector<int> store(1000006, 0);
 
void SieveOfEratosthenes() 
{ 
    // Create a boolean array "prime[0..n]" and initialize 
    // all entries it as true. A value in prime[i] will 
    // finally be false if i is Not a prime, else true. 
    memset(prime, true, sizeof(prime)); 
  	
    for (int p=2; p*p<=1000000; p++) 
    { 
        // If prime[p] is not changed, then it is a prime 
        if (prime[p] == true) 
        { 	store[p] = p;
            // Update all multiples of p greater than or  
            // equal to the square of it 
            // numbers which are multiple of p and are 
            // less than p^2 are already been marked.  
            for (int i=p*p; i<=1000000; i += p) {
                prime[i] = false; 
                if(store[i] == 0) store[i] = p;
                store[i] = min(store[i], p);
            }
        } 
    } 
  
} 
 
 
int main(){
	int n;
	cin>>n;
	int A[n];
	for (int i=0; i<n; i++){
		cin>>A[i];
	}
	int res = A[0];
	for (int i=1; i<n; i++){
		res = __gcd(res, A[i]);
	}
	if(res != 1){
		cout<<"not coprime";
		return 0;
	}
	SieveOfEratosthenes();
	map<int,int> temp;
	int check = 0;
	for (int i=0; i<n; i++){
		int k = store[A[i]];
		if(temp[k] > 0){
			check = 1;
			break;
		}
		temp[k]++;
	}
	if(check == 0)	cout<<"pairwise coprime";
	else	cout<<"setwise coprime";
}