#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, num = 0;
	cin >> n;
	int v[n];
	for(int i = 0; i < n; i++){
		scanf("%d", &v[i]);
		num = max(num, v[i]);
	}
	bool ok = true;
	for(int i = 0; i < p_index && prime[i] <= num; i++){
		int cnt = 0;
		for(int j = 0; j < n; j++){
			cnt += v[j] % prime[i] == 0;
		}		
		if(cnt >= 2)
			ok = false;
	}
	if(ok){
		puts("pairwise coprime");
		return 0;
	}
	int p_check = v[0];
	for(int i = 1; i < n; i++){
		p_check = __gcd(p_check, v[i]);
	}
	puts(p_check == 1 ? "setwise coprime" : "not coprime");
	return 0;
}