#include <bits/stdc++.h>
#define ll long long
#define foi(n) for(ll i=0;i<n;i++)
#define foj(n) for(ll j=0;j<n;j++)
#define pb push_back
using namespace std;

int32_t  main(){
	ll n;
	cin>>n;
	ll a[n];
	foi(n)
	cin>>a[i];
	set<ll> s;
	bool is=true;
	foi(n){
		for(ll j=2;j<=sqrt(a[i]);j++){
			ll ss=s.size();
			if(a[i]%j==0){
			s.insert(j);
			if(s.size()==ss) {
				is=false;
				goto out;
			}
			ss+=1;
			if(j!=a[i]/j){
			s.insert(a[i]/j);
			if(s.size()==ss) {
				is=false;
				goto out;
			}
			}
			}
			
		}
	}
	out:
	if(is) {cout<<"pairwise coprime"<<endl; return 0;}
	
	ll gc=a[0];
	foi(n) gc=__gcd(a[i],gc);
	if(gc==1) cout<<"setwise coprime"<<endl;
	else cout<<"not coprime"<<endl;
	
	
}