#include<bits/stdc++.h>
using namespace std;
const int maxN = 1e6 + 7;
int prime[maxN], p_index;
bool mark[maxN];
void sieve(){
	int limit = sqrt(maxN * 1.0) + 2;
	prime[p_index++] = 2;
	for(int i = 4; i < maxN; i += 2){
		mark[i] = true;
	}
	for(int i = 3; i < maxN; i += 2){
		if(!mark[i]){
			prime[p_index++] = i;
			for(int j = i * i; j < maxN && i <= limit; j += 2 * i){
				mark[j] = true;
			}
		}
	}
}
int main(){
	sieve();
	int n;
	cin >> n;
	int v[n];
	for(int i = 0; i < n; i++){
		scanf("%d", &v[i]);
	}
	map<int, int> checker;
	int p_check;
	for(int i = 0; i < n; i++){
		p_check = i == 0 ? v[i] :  __gcd(p_check, v[i]);
		int x = v[i];
		for(int j = 0; j < p_index and prime[i] * prime[i] <= x; j++){
			if(x % prime[j] == 0){
				++checker[prime[j]];
				while(x % prime[j] == 0){
					x /= prime[j]; 
				}
				if(x > 1)
					++checker[x];
			}
		}
	}
	bool ok = true;
	for(auto m : checker){
		if(m.second >= 2){
			ok = false;
			break;
		}
	}
		
	if(ok){
		puts("pairwise coprime");
		return 0;
	}
	puts(p_check == 1 ? "setwise coprime" : "not coprime");
	return 0;
}