#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n;
ll a;
ll mul;

ll gcd(ll x,ll y) {
	if(x<y) {
		swap(x,y);
	}
	if(x%y==0) {
		return y;
	}
	return gcd(y,x%y);
}

ll lcm(ll x,ll y) {
	return x/gcd(x,y)*y;
}


int main() {
	scanf("%d",&n);
	scanf("%lld",&a[1]);
	bool f1=0,f2=0;
	ll Fgcd,Flcm;
	Fgcd=Flcm=mul=a[1];
	for(int i=2;i<=n;i++) {
		scanf("%lld",&a);
		Fgcd=gcd(Fgcd,a);
		Flcm=lcm(Flcm,a);
		mul*=a;
	}
	if(Flcm==mul) {
		f1=1;
	}
	if(Fgcd==1) {
		f2=1;
	}
	if(f1) {
		printf("pairwise coprime");
	}else if(f2) {
		printf("setwise coprime");
	}else {
		printf("not coprime");
	}
	return 0;
}