#include<bits/stdc++.h>
using namespace std;
using ll = long long;

vector<ll> fsctor(int n,const vector<ll>& min_factor)
{
	vector<ll> res;
	while(n>1)
	{
		res.push_back(min_factor[n]);
		n /= min_factor[n];
	}
	return res;
}
int main()
{
	int n;
	cin >> n;
	vector<ll> sieve(1000005,0);
	iota(sieve.begin(),sieve.end(),0);
	for(ll i = 2;i*i<1000005;i++)
	{
		if(sieve[i]<i)continue;
		for(ll j = i*i;j<1000005;j+=i)if(sieve[j]==j)sieve[j]=i;
	}

	vector<ll> a(n);
	for(auto &i:a)cin >> i;
	vector<map<int,int>> vm(n);
	for(int i = 0;i<n;i++)
	{
		auto now = fsctor(a[i],sieve);
		for(auto j:now)vm[i][j]++;
	}
	vector<ll> prime;
	for(int i = 2;i<1000005;i++)
	{
		if(sieve[i]==i)prime.push_back(i);
	}
	bool isparwize = true;
	for(int i = 0;i<n;i++)
	{
		bool tow = false;
		for(auto j:prime)
		{
			
			if(vm[i].count(j))
			{
				if(tow)isparwize=false;
				tow=true;
			}
		}
	}
	if(isparwize)
	{
		cout<<"pairwise coprime"<<endl;
		return 0;
	}
	ll GCD = a[0];
	for(int i = 0;i<n;i++)
	{
		GCD = __gcd(GCD,a[i]);
	}
		if(GCD==1)cout<<"setwise coprime"<<endl;
		else cout<<"not coprime"<<endl;
	

}
