#include<bits/stdc++.h>
#define fo(i,a,b) for((i)=(a);i<=(b);i++)
#define rfo(i,a,b) for((i)=(a);i>=(b);i--)
#define inrange(x,y,z) (((x)>=(y))&&((x)<=(z)))
#define ALL(vec) (vec).begin(),(vec).end()
#define SOR(vec) sort(ALL(vec))
#define UNI(vec) (vec).erase(unique(ALL(vec)),(vec).end())
using namespace std;
int n,a[1000100],vis;
int v[1000100],pws;
vector<int> primes;
void linear(int N){
	memset(v,0,sizeof(v));
	primes.clear();
	for(int i=2;i<=N;i++){
		if(v[i]==0){v[i]=i;primes.push_back(i);}
		for(int j=0;j<primes.size();j++){
			if(primes[j]>v[i]||primes[j]>(N/i)) break;
			v[i*primes[j]]=primes[j];
		}
	}
}
int main(){
	#ifdef FILIN
		#ifndef DavidDesktop
			freopen(FILIN,"r",stdin);
			freopen(FILOUT,"w",stdout);
		#endif
	#endif
	ios::sync_with_stdio(0);
	cin.tie(NULL);
	cout.tie(NULL);
	linear(1000000);
	cin>>n;
	for(int i=1;i<=n;i++)
		cin>>a[i];
	int go=a[1];
	for(int i=1;i<=n;i++) go=__gcd(a[i],go);
	if(go!=1){
		cout<<"not coprime"<<endl;
		return 0;
	}
	pws=0;
	sort(a+1,a+n+1);
	reverse(a+1,a+n+1);
	for(int j=0;j<primes.size();j++){
		vis=0;
		for(int i=1;i<=n;i++){
			if(primes[j]>a[i]) break;
			if(a[i]%primes[j]==0){
				if(vis){
					pws=1;
					break;
				}
				vis=1;
			}
		}
		if(pws) break;
	}
	if(!pws){
		cout<<"pairwise coprime"<<endl;
		return 0;
	} 
	cout<<"setwise coprime"<<endl;
	return 0;
}
