#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
int prime[1000001];
memset(prime,0,sizeof(prime));
for(int i=2;i*i<=1000000;i++){
	if(prime[i]==0){ for(ll int j=i;j<=1000000;j = j+i){
    	if(prime[j]==0){prime[j] = i;}
    }}
}
int n=0,z=0,x=0,arr[1000001],q=1;
memset(arr,0,sizeof(arr));
cin >> n;
for(int i=0;i<n;i++){
cin >> z;
//if(z==1){continue;}
//else{
  	if(x==0){x = z;}
	else x = __gcd(x,z);
  	//if(x!=1){}
  	set<int> p;
  	while(z>1){
    	p.insert(prime[z]);
      	z /= prime[z];
    }
  	for(auto k : p){
    	if(arr[k]){q=0;}
      	arr[k] = 1;
    }
//}
}
if(q){cout <<"pairwise coprime"<<endl;}
else if(x==1){cout << "setwise coprime"<<endl;}
else cout <<"not coprime"<<endl;
}