#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define int long long
using namespace std;
 
const int N = 2e6 + 5;
const int mod = 1e9 + 7;

int a[N];
int occ[N];

int32_t main() {
	fast;
	int n;
	cin>>n;
	for(int i=0; i<n; i++) cin>>a[i];
	bool ok = true;
	for(int i=0; i<n; i++){
		int x = a[i];
		for(int i=2; i*i <=x; i++){
			if(x%i == 0){
				occ[i]++;
				if(occ[i]>1) ok = false;
				while(x%i == 0 ) x/= i;
			}
		}
		if(x!=1) occ[x]++;
		if(occ[x] > 1) ok = false;
	}
	if(ok){
		cout<<"pairwise coprime" <<endl;
		return 0;
	}
	for(int i=1; i<= 1000000; i++){
		if(occ[i] == n){
			cout<<"not coprime" <<endl;
			return 0;
		}
	}
	cout<<"setwise coprime"<<endl;
}



