#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
#define vv vector<lli>
#define vp vector<pair<lli,lli>>
#define vpp vector<pair<lli,pair<lli,lli>>>
#define lims(w) (w).begin(),(w).end()
#define rlims(w) (w).rbegin(),(w).rend()
#define pb push_back
#define mp make_pair
#define f(i,a,b) for(lli i=a;i<b;i++)
#define ff first
#define ss second
#define sz(a) (lli)(a.size())
lli inf = (1e18 + 2);
lli asc[1000003] = {0};
lli prlim = 78502;
lli asc2[1000003] = {0};

int main()
{
	lli n;
	cin>>n;
	lli a[n+1];
	vv v;
	lli gcd = 0;
	bool sety = false;
	bool pairy = true;

	f(i,0,n)
	{
		cin>>a[i];
		gcd = __gcd(gcd, a[i]);
		asc[a[i]]++;
	}

	sety = (gcd == 1);

	f(i,2,1000001)
	{
		if(asc[i] > 0)
			v.pb(i);

		if(asc[i] > 1)
		{
			if(sety)
				cout<<"setwise coprime"<<endl;
			else
				cout<<"not coprime"<<endl;
			return 0;	
		}
	}

	lli els = n;

	if(asc[1] > 1)
	{
		els -= (asc[1] - 1);
	}

	if(asc[1] > 0)
		v.pb(1);

	if(els > prlim)
	{
		if(sety)
			cout<<"setwise coprime"<<endl;
		else
			cout<<"not coprime"<<endl;
		return 0;
	}

	lli val;

	f(z,0,sz(v))
	{
		if(!pairy)
			break;
		val = v[z];

		if(asc2[2] > 0 && val % 2 == 0)
		{
			pairy = false;
			break;
		}

		while(val % 2 == 0)
		{
			asc2[2] = 1;
			val /= 2;
		}

		for(lli i = 3; i*i <= val && !pairy; i = i + 2)
		{
			if(val % i == 0)
			{
				if(asc2[i] > 0)
				{
					pairy = false;
					break;
				}

				while (val % i == 0)
				{
					asc2[i] = 1;
					val /= i;
				}
			}
		}

		if(val > 2)
		{
			if(asc2[val] > 0)
				pairy = false;
			else
				asc2[val] = 1;
		}
	}

	if(pairy)
		cout<<"pairwise coprime"<<endl;
	else if(sety)
		cout<<"setwise coprime"<<endl;
	else
		cout<<"not coprime"<<endl;

	return 0;
}
