#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int M = 1e6+5;
vector<int> primes;
bool isprime[M];
int n;
bool vis[M]={0};
int a[M];
bool iscoprime(){
	for(int i=0;i<n;i++){
		for(auto p:primes){
			if(p > a[i])break;
			if(a[i]%p==0){
				if(vis[p])return false;
				vis[p]=1;
			}
		}
	}
	return true;
}
int main(){
	for(int i=2;i<=M;i++){
		if(isprime[i]==0){
			isprime[i]=i;
			primes.push_back(i);
			for(auto j:primes){
				if(i*j >= M)break;
				isprime[i*j]=i;
			}
		}
	}
	scanf("%d",&n);
	bool setprime = 0;
	int g=0;
	for(int i=0;i<n;i++){
		scanf("%d",&a[i]);
		if(i==0)g=a[i];
		else g = __gcd(a[i],g);
	}
	if(g == 1)setprime=1;
	bool x = iscoprime();
	if(x){
		cout<<"pairwise coprime"<<'\n';
	}else if(setprime){
		cout<<"setwise coprime"<<'\n';
	}else {
		cout<<"not coprime"<<'\n';
	}
    return 0;
}
