#include <bits/stdc++.h>
using namespace std;
 
typedef long long int ll;
 
vector <ll> primes;
bool visited[1000006];
vector <ll> input;
 
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
 
	ll i,j,k,l,m,n,x,y,z,a,b,c;

	for(i=1;i<=1000001;i++)
		visited[i] = false;
 
	for(i=2;i<=1000001;i++)
	{
		if(visited[i] == false)
		{
			primes.push_back(i);
			for(j=i+i;j<=1000001;j+=i)
			{
				visited[j] = true;
			}
		}

	}

	// cout << primes.size();



	

	cin >> n;

	for(i=0;i<n;i++)
	{
		cin >> k;
		input.push_back(k);
	}
	bool setwise,pairwise;
	setwise = pairwise = false;

	k = input[0];
	for(i=0;i<n;i++)
	{
		k = __gcd(input[i],k);



	}

	if(k == 1)
	{
		setwise = true;
	}

	if(n >= primes.size()+1)
	{

		cout << "pairwise coprime\n";
		return 0;
	}

	// cout << k << '\n';

	
	for(i=0;i<primes.size();i++)
	{
		k = 0;
		for(j=0;j<n;j++)
		{
			if(input[j]%primes[i] == 0)
				k++;

			if(k >= 2)
			{
				pairwise = true;
				break;
			}

		}

		if(pairwise == true)
			break;
	}

	if(pairwise == false)
	{
		cout << "pairwise coprime\n";
	}
	else if(setwise == true)
	{
		cout << "setwise coprime\n";
	}
	else
	{
		cout << "not coprime\n";
	}





	


 
}