#include<bits/stdc++.h>
using namespace std;
int n,a[1000100],vis;
int v[1000100],pws,primes[78498],tot;
int ihateabc[100100],too;
void linear(int N){
	memset(v,0,sizeof(v));
	tot=0;
	for(int i=2;i<=N;i++){
		if(v[i]==0){v[i]=i;primes[tot]=i;tot++;}
		for(int j=0;j<tot;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
	linear(1000000);
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		scanf("%d",&a[i]);
	int go=a[1];
	for(int i=1;i<=n;i++) go=__gcd(a[i],go);
	if(go!=1){
		puts("not coprime");
		return 0;
	}
	pws=0;
	sort(a+1,a+n+1);
	for(int i=2;i<=n;i++){
		if(a[i]==a[i-1]&&a[i]!=1){
			puts("setwise coprime");
			return 0;
		}
	}
	too=0;
	for(int i=1;i<=n;i++){
		if(a[i]!=a[i-1]&&a[i]!=1){
			too++;
			ihateabc[too]=a[i];
		}
	}
	n=too;
	for(int i=1;i<=too;i++) a[i]=ihateabc[i];
	reverse(a+1,a+n+1);
	if(n>78498){
		puts("setwise coprime");
		return 0;
	}
	for(int j=0;j<tot;j++){
		if(primes[j]>a[1]) break;
		vis=0;
		for(int i=1;i<=n;i++){
			if(primes[j]>a[i]) break;
			if(a[i]%primes[j]==0){
				if(vis){
					puts("setwise coprime");
					return 0;
				}
				vis=1;
			}
		}
	}
	puts("pairwise coprime");
	return 0;
}
