#include <bits/stdc++.h>

#define f(i,a,b) for( ll i = a; i < b ; i++ ) 
#define af(i,a,b) for( ll i = a; i >= b ; i--)
#define rep(i,a,b,k) for(ll i = a; i < b ; i+= k )
#define arep(i,a,b,k) for( ll i = a; i >= b ; i-= k)
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz(a) (ll) a.size()
#define all(a) a.begin(), a.end()
#define sor(a) sort( a.begin(), a.end() )
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL)
#define ller ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr)
 
using namespace std;
typedef int ll;
typedef long double ld;
typedef pair<ll,ll> ii;
typedef vector<ll> vi;
typedef vector<ii> vii;
 
const ll MAX = 1e6 + 100;
const ll inf = 1e9;
const ll mod = 1e9 + 7;

ll p[MAX],cont[MAX];

int main(){
	p[1] = 1;
	f(i,2,MAX){
		if(p[i] == 0){
			rep(j,i,MAX,i) p[j] = i;
		}
	}
	fastio;
	ll n,g = 0,x;
	cin >> n;
	f(i,0,n){
		cin >> x;
		g = __gcd(g,x);
		while(x>1){
			ll aux = p[x];
			while(x%aux == 0) x/=aux;
			cont[aux]++; 
		}
	}
	bool go = true;
	f(i,1,MAX) if(cont[i]>1) go = false;
	if(go) cout << "pairwise coprime\n";
	else if(g == 1) cout << "setwise coprime\n";
	else cout << "no prime\n";

	return 0;
}