#include<bits/stdc++.h>
#define N_MAX 1000100
using namespace std;
int cont=1;
bool cb[N_MAX];
typedef long long ll;
vector<int> divi;
int mat[N_MAX];
void criba(){
	divi.assign(N_MAX,-1);
	memset(cb,0,sizeof cb);
	for(int i = 2; i < N_MAX; i++)
		if(!cb[i]){
			cont++;
			if((ll)i*i >= N_MAX)
				continue;
			for(int j = i*i; j < N_MAX; j += i){
				cb[j] = 1;
				divi[j] = i;
			}
		}
}
int main(){
	criba();
	int n;
	scanf("%d",&n);
	vector<int> v(n);
	for(int& x : v)
		scanf("%d",&x);
	int gcd = v[0];
	for(int x : v)
		gcd = __gcd(gcd,x);
	if(n > 2*cont){
		if(gcd == 1)
			printf("setwise coprime\n");
		else
			printf("not coprime\n");
	}
	else{
		bool sw = 1;
		for(int x : v){
			while(x > 1){
				int y;
				if(divi[x] == -1)
					y = x;
				else
					y = divi[x];
				if(mat[y]){
					sw = 0;
					break;
				}
				mat[y]++;
				while(x%y == 0)
					x = x/y;
			}
			if(!sw)
				break;
		}
		if(!sw){
			if(gcd == 1)
				printf("setwise coprime\n");
			else
				printf("not coprime\n");		
		}
		else
			printf("pairwise coprime\n");
	}
	return 0;
}