#include<bits/stdc++.h>
#include<iomanip>
#define fast {ios_base::sync_with_stdio(false);cin.tie(NULL);}
#define mxn 1000003
#define mod 1000000007
#define ld long double
#define pb push_back
#define inf 1e18
#define fi first
#define se second
typedef long long int ll;
using  namespace std;
vector<int>primes;
int put[mxn];
int cnt[mxn];
void sieve(){
	for(int i=2;i<mxn;i++){
		if(!put[i]){
			primes.pb(i);
			for(int j=1;j*i<=mxn;j++)
			put[i*j]=1;
		}
	}
}
int main(void){
	#ifndef ONLINE_JUDGE
	freopen("input1.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	fast;
	int n,cr=0,i,bad=0;
	cin>>n;
	int a[n],g=0;
	sieve();
	for(i=0;i<n;i++){
		cin>>a[i];
		g=__gcd(g,a[i]);
	}
	for(i=0;i<n;i++){
		cr=0;
		for(auto x:primes){
		//	cout<<x<<" ";
			if(x>a[i])
			break;
			if(a[i]%x==0)
			cnt[cr]++;
			if(cnt[cr]>1)
			bad=1;
			cr++;
		}
	}
	if(bad){
		if(g==1)
		cout<<"setwise coprime";
		else
		cout<<"not coprime";
	}
	else{
		cout<<"pairwise coprime";
	}
}
