#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back

#define ios ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

vector<int> isPrime(1000006);
void seive()
{
	for(int i=3;i<=1000005;i+=2)
	{
		if(isPrime[i]!=-1) continue;
		isPrime[i]=1;
		for(int j=i*i;j<=1000005;j+=2*i) isPrime[j]=-1;
	}
}
int main()
{
	ios;
	seive();
	ll n,i,g,j;
	vector<ll> m(1000005),a(1000005);
	for(i=0;i<1000005;i++) m[i]=0;
	ll x=0;
	cin>>n;
	for(i=0;i<n;i++) cin>>a[i];
	g=a[0];
	for(i=1;i<n;i++) g=__gcd(g,a[i]);
	for(j=0;j<n;j++)
	{
		if(a[j]%2==0)
		{
			if(m[2]==1) {x=1; break;}
			else m[2]=1;
		}
		for(i=3;i<=sqrt(a[j]);i+=2)
		{
			if(isPrime[i]==1 && a[j]%i==0)
			{
				if(m[i]==1) {x=1; break;}
				m[i]=1;	
			}
			if(x==1) break;
		}
	}
//	cout<<x<<" "<<g<<" ";
	if(x==0) cout<<"pairwise coprime";
	else if(g==1) cout<<"setwise coprime";
	else cout<<"not coprime";		
	return 0;
}
