#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define ld long double
#define pb push_back
 
#define mo 1000000007
#define inf 1e18
#define rep(i, s, n) for (ll i = s; i < n; i = i + 1)
#define rrep(i,s,n) for(ll i=s;i>=n;i--)

ll mod(ll n) { return (n % (ll)mo + (ll)mo)%(ll)mo;}


int main(){
	ll n;
	cin>>n;
	vector<ll> a(n);
	rep(i,0,n) cin>>a[i];
	
	ll g = a[0];
	ll f = 0;
	rep(i,1,n){
		g = __gcd(g,a[i]);
		if(g!=1) f = 1;
	}
	if(f==0 && g==1) cout<<"pairwise coprime";
	else if(f==1 && g==1) cout<<"setwise coprime";
	else cout<<"not coprime";
	
}