#include<bits/stdc++.h>
using namespace std;
# define ll long long 
bool coprime(ll p, ll q) 
{    
    return (__gcd(p, q) == 1); 
} 
  
ll numOfPairs(vector<ll> a, ll n) 
{  
    ll count = 0;  
    for (auto i = 0; i < n - 1; i++) { 
        for (auto j = i + 1; j < n; j++){ 
            if (coprime(a[i], a[j])) {
                count++; 
            }
        }
    }
                  
    return count; 
}
int main(){
    ll n;
    cin>>n;
    vector<ll> a(n);
    cin>>a[0];
    ll res = a[0];
    ll ans=0,num;
    for(auto i=1;i<n;i++){
        cin>>a[i];
        res = __gcd(a[i],res);
    }
       num = (n*(n-1))/2;
    ans = numOfPairs(a,n);
    if(res != 1){
        cout<<"not coprime";
    }
    else{
        if(num != ans){
            cout<<"setwise coprime";
        }
        else{
            cout<<"pairwise coprime";
        }
    }
    return 0;
}