//Think simple yet elegant.
#include <bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll  long long
#define ld long double
#define all(v) v.begin(),v.end()
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define pi pair<int,int>
const ll maxn=1e6+5;
const ll mod=1e9+7;

vector<ll> spf(maxn,-1);
vector<bool> p(maxn,true);
void sieve(){
	for(ll i=2;i*i<=maxn;++i){
		if(p[i]){
			spf[i]=i;
			for(ll j=2*i;j<=maxn;j+=i){
				p[j]=false; 
				spf[j]=i;
			}
		}
	
	}
}
int main(){
	fast;
	ll n,k,i,j,x,res;
	cin>>n;
	vector<ll> a(n);
	for(i=0;i<n;i++){
		cin>>a[i];
		if(i>0)
		res=__gcd(res,a[i]);
		else
		res=a[0];
	}
	
	sieve();
	set<ll> s2;
	int f=0;
	for(ll x : a){
		set<ll> s1;
		if(x>1){
			while(x>1){
				s1.insert(spf[x]);
				x/=spf[x];
			}
			int p1=(int)s1.size();
			int p2=(int)s2.size();
			for(ll x : s1){
				s2.insert(x);
			}
			if((int)s2.size()==(p1+p2)){
				
			}
			else{
				f=1;
				break;
			}
		}
	}
	if(!f){
		cout<<"pairwise coprime";
	}
	else if(res==1){
		cout<<"setwise coprime";
	}
	else
		cout<<"not coprime";
	
		
	
	
}