#include <bits/stdc++.h>
#define maxn 1000086

using namespace std;

int n, x;
int y;

int p[maxn], cnt;
bool tag[maxn];
bool suc = true;

int main(){
	for(int i = 2;i < maxn;i++){
		if(!tag[i]) p[++cnt] = i;
		for(int j = 1;j <= cnt && p[j] * i < maxn;j++){
			tag[p[j] * i] = true;
			if(i % p[j] == 0) break;
		}
	}
	memset(tag, 0, sizeof(tag));
	scanf("%d", &n);
	while(n--){
		scanf("%d", &x);
		if(!y) y = x;
		else y = __gcd(y, x);
		if(!suc) continue;
		for(int i = 1;i <= cnt;i++){
			if(x % p[i] == 0){
				if(tag[i]) suc = false;
				else tag[i] = true;
			}
		}
	}
	if(suc) printf("pairwise coprime");
	else if(y == 1) printf("setwise coprime");
	else printf("not coprime");
}