#include<bits/stdc++.h>
#pragma GCC optimize("trapv")
#define I inline void 
#define S struct 
#define vi vector<int> 

using namespace std ; 
using ll = long long ; 
using ld = long double ; 

const int N = 1e6 + 7 , mod = 1e9 + 7 ; 
int n ; 

// How interesting!

int occ[N] ; 

int main(){
	ios_base::sync_with_stdio(0) ; 
	cin.tie(0) ;
	//freopen("in.in" , "r" , stdin) ; 
	cin >> n ; 
	ll gc = 0 ; 
	for(int i = 0 ;i < n ;i++){
		ll x; 
		cin >> x ; 
		gc = __gcd(gc , x) ; 
		for(int j = 2;j * j <= x ;j++){
			if(x%j == 0){
				occ[j]++ ; 
				while(x%j == 0){
					x/=j ; 
				}
			}
		}
		if(x > 1)occ[x] ++ ; 
	}
	bool ok = 1; 
	for(int i = 1 ; i<=n;i++){
		if(occ[i] > 1){
			ok = 0 ;
		}
	}
	if(ok){
		cout<<"pairwise coprime" ; 
	}
	else if(gc == 1){
		cout <<"setwise coprime" ; 
	}
	else cout<<"not coprime" ; 
	return 0 ; 
}
