#include <bits/stdc++.h>
using namespace std;
#define MAX 1000000
#define ll long long


int main(){
    vector<bool> primes_vec(MAX+1,true);
    vector<ll> div_vec(MAX+1,true);
    ll div=2;
    for(ll i=2;i<=MAX;i++){
        div_vec[i]=i;
    }
    while(div*div<=MAX){
        for(ll cnt=div*2; cnt<=MAX; cnt+=div){
            primes_vec[cnt]=false;
            div_vec[cnt]=min(div_vec[cnt],div);
        } 
        div++;
        for(;!primes_vec[div];div++){}
    }

    //unordered_set<ll> primes;
    vector<ll> primes;
    vector<ll> factor(MAX+1,0);
    for(ll i=2;i<=MAX;i++){
        if(primes_vec[i]){
            primes.push_back(i);
        }
    }
    ll n;
    cin >> n;
    for(ll i=0;i<n;i++){
        ll a;
        cin >> a;
        ll maxp=0;
        while(a>1){
            ll p = div_vec[a];
            factor[p]++;
            while(a%p==0)a/=p;
        }
    }
    ll fmax = 0;
    ll fmin = INFINITY;
    for(ll j=0; j<size(primes); j++){
        ll p = primes[j];
        ll fp = factor[p];
        fmax = max(fmax,fp);
        fmin = min(fmin,fp);
    }
    if(fmax<=1){
        cout << "pairwise coprime";
    }else if(fmin<=1){
        cout << "setwise coprime";
    }else{
        cout << "not coprime";
    }
}