#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
ll M=1e9+7;


#define MAXN 1005
ll spf[MAXN]; 
ll hash[MAXN];
void sieve(vector<ll> &v) 
{ 
	for(ll i=0;i<MAXN;i++){
		spf[i]=1;
		hash[i]=0;
	}
	spf[0]=0;
	spf[1]=0;
	spf[2]=1;
	for(ll i=2;i<MAXN;i++){
		if(spf[i]==1){
			for(ll j=2;j<=MAXN/i;j++){
				spf[j*i]=0;
			}
		}
	}
	
	for(ll i=0;i<MAXN;i++){
		if(spf[i]==1){
			v.push_back(i);
		}
	}
}  
 
int main()
{
	ll n;
	cin>>n;
	vector<ll> v;
	sieve(v);
	vector<ll> vec(n+1,0);
	bool bb=1;
	for(ll i=1;i<=n;i++){
		cin>>vec[i];
	}
	
	for(ll i=0;i<v.size();i++){
		ll x=0;
		for(ll j=1;j<=n;j++){
			if(vec[j]%v[i]==0){
				x++;
				if(x==2){
					bb=0;
					break;
				}
			}
		}
		if(bb==0) break;
	}
	
	if(bb==1){
		cout<<"pairwise coprime"<<endl;
	}
	else{
		ll g=vec[1];
		for(ll i=2;i<=n;i++){
			g=__gcd(g,vec[i]);
		}
		if(g==1){
			cout<<"setwise coprime"<<endl;
		}
		else{
			cout<<"not coprime"<<endl;
		}
	}
	
}