#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz(a) (ll)(a.size())
#define pll pair<ll,ll>
#define all(v) v.begin(), v.end()
#define FOR(i, a, b) for(i=a;i<b;i++)
const ll L = 1e6+1;
vector<ll> ad[L];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ll i,j,k,n,t;
	ad[1].pb(1);
	for(i=2;i<L;i++)
	{
		for(j=i;j<L;j+=i)
			ad[j].pb(i);
	}
	cin>>n;
	vector<ll> v(n);
	for(i=0;i<n;i++)
		cin>>v[i];

	ll done[L]={0};
	for(i=0;i<n;i++)
		for(j=0;j<sz(ad[v[i]]);j++)
			done[ad[v[i]][j]]++;
	ll cnt = 0;
	for(i=1;i<L;i++)
		cnt += (ll)(done[i]>1);
	if(cnt==0)
		cout<<"pairwise coprime"<<endl;
	else
	{
		ll gcd = 0;
		for(i=0;i<n;i++)
			gcd = __gcd(gcd, v[i]);
		if(gcd == 1)
			cout<<"setwise coprime"<<endl;
		else
			cout<<"not coprime"<<endl;
	}
	return 0;
}