// C++ program to print all primes smaller than or equal to 
// n using Sieve of Eratosthenes 
#include <bits/stdc++.h> 
using namespace std; 
int prime[2000001]={0}; 
void SieveOfEratosthenes(int n) 
{ 
	for (int p=2; p*p<=n; p++) 
	{ 
		// If prime[p] is not changed, then it is a prime 
		if (prime[p] == 0) 
		{ 
			// 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<=n; i += p) 
				prime[i] = p; 
		} 
	} 
} 

// Driver Program to test above function 
int main() 
{ 
	int n = 1000000,b;  
	SieveOfEratosthenes(n);
	std::cin >> b;
	int a[b],x,c=0;
	map<int,int>mp;
	for(int i=0;i<b;i++)
	{
	    std::cin >> a[i];
	    if(i==0)
	    x=a[i];
	    else
	    x=__gcd(x,a[i]);
	    mp[prime[a[i]]]++;
	}
	if(mp.size()==n)
	{
	    cout << "pairwise coprime\n" ;
	}
	else if(x==1)
	{
	    cout<<"setwise coprime\n";
	}
	else
	cout<<"not coprime\n";
	return 0; 
} 
