//hail to jwalaji
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long int lli;
 bool prime[1000005];
 vector<lli> primes;
 bool factorize(vector<lli> a){
     for(lli i=0;i<a.size();++i)
     {
        // cout<<"a[i] : "<<a[i]<<endl;
 lli start=0;
 while(a[i]>1){
        if(start>=primes.size()){
           primes.push_back(a[i]);
 //cout<<"primes : "<<a[i]<<endl;
    prime[a[i]]=1;
        break;
    }
    if((a[i]%primes[start])==0){
            if(prime[primes[start]]==1){
                return false;
            }
        while((a[i]%primes[start])==0&&a[i]>1){
            a[i]=a[i]/primes[start];
           // cout<<"primes : "<<primes[start]<<endl;
        }
        prime[primes[start]]=1;
    }
    start++;
 }
 }
 return true;
 }
int main(){
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    prime[0]=1;
    prime[1]=1;
    for(lli i=2;i<sqrt(100005);i++){
        if(prime[i])continue;
        else{
            for(lli j=i;j*i<100005;j++){
                prime[i*j]=1;
            }
        }
    }
    for(lli i=0;i<100005;i++){
        if(!prime[i]){
            primes.push_back(i);
        }
    }
   // for(lli i=0;i<100;i++){
  //      cout<<primes[i]<<" ";
   // }
lli n;
cin>>n;
vector<lli> arr(n);
for(lli i=0;i<n;i++){
    cin>>arr[i];
}
//bool pairwise=false,setwise=false;
if(factorize(arr)){
    cout<<"pairwise coprime"<<endl;
    return 0;
}
lli check=__gcd(arr[0],arr[1]);
for(lli i=2;i<arr.size();++i){
    check=__gcd(check,arr[i]);
}
if(check==1){
    cout<<"setwise coprime"<<endl;
    return 0;
}
cout<<"not coprime"<<endl;
return 0;
}
