#include<bits/stdc++.h>
#define N_MAX 1000100
using namespace std;
int cont=1;
bool cb[N_MAX];
typedef long long ll;
void criba(){
	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;
		}
}
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 > cont){
		if(gcd == 1)
			printf("setwise coprime\n");
		else
			printf("not coprime\n");
	}
	else{
		bool sw = 1;
		for(int i = 0; i < n; i++)
			for(int j = i+1; j < n; j++)
				if(__gcd(v[i],v[j]) > 1)
					sw = 0;
		if(!sw){
			if(gcd == 1)
				printf("setwise coprime\n");
			else
				printf("not coprime\n");		
		}
		else
			printf("pairwise coprime\n");
	}
	return 0;
}