#include <bits/stdc++.h>
using namespace std;
#define AC 0
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int n,gcd=0;
	cin>>n;
	vector<int> a(n),prime(n);
	bool p=1;
	for(int i=0;i<n;i++) {
		cin>>a[i];
		int tmp=a[i];
		for(int j=2;j*j<=tmp;j++)
			if(!(tmp%j)) {
				if(prime[j]) p=0;
				prime[j]=1;
				while(!(tmp%j)) tmp/=j;
			}
		gcd=__gcd(gcd,a[i]);
	}
	if(p) cout<<"pairwise coprime\n";
	else if(gcd==1) cout<<"setwise coprime\n";
	else cout<<"not coprime\n";
	return AC;
}
