#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define F first
#define S second
#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

void solve(){
    map<ll,ll> primes;
    ll n;
    cin>>n;
    ll a[n];
    ll gcd = 0;
    for(int i =0;i<n;i++){
        cin>>a[i];
        if(i==0){
            gcd = a[i];
        }
        else{
            gcd = __gcd(a[i],gcd);
        }
        for(ll j = 2;j*j<=a[i];j++){
            if(a[i]%j==0){
                primes[j]++;
            }
        }
    }
    bool ok = true;
    for(auto it : primes){
        if(it.S>1){
            ok = false;
        }
    }
    if(gcd==1 && ok){
        cout<<"pairwise coprime\n";
    }
    else if(gcd==1){
        cout<<"setwise coprime\n";
    }
    else
    {
        cout<<"not coprime\n";
    }
    
}
int main(){
    IOS
    int tt;
    tt = 1;
    // cin>>tt;
    while(tt--){
        solve();
    }
    return 0;
}
