#include <bits/stdc++.h>
using namespace std;
#define all(a)a.begin(),a.end()
using ll=long long;
const int INF = 1<<30;
const ll INFll =1LL<<62;
const int mod= int(1e9)+7;
//const int mod=998244353;
using P = pair<int,int>;
using Pll = pair<ll,ll>;
using ld=long double;
using V=vector<int>;
using Vl=vector<ll>;
using VV=vector<vector<int>>;
using VVl=vector<vector<ll>>;

int main(){
    int mx=1100;
    vector<bool>isprime(mx,true);
    vector<ll>prime;
    for (ll i = 2; i < mx; ++i) {
        if(isprime[i]){
            prime.push_back(i);
            for(ll j=i*2;j<mx;j+=i){
                isprime[j]=false;
            }
        }
    }
    int n;cin >>n;
    V a(n);
    for (int i = 0; i < n; ++i) {
        cin >>a[i];
    }
    sort(all(a));
    bool flg=true;
//    cout <<prime.size()<<endl;
    for(auto p:prime){
        ll cnt=0;
        for (int i = 0; i < n; ++i) {
            if(a[i]%p==0)cnt++;
        }
        if(cnt>=2){
            flg=false;
            break;
        }
    }
    if(flg)puts("pairwise coprime");
    else {
        int g=0;
        for (int i = 0; i < n; ++i) {
            g=__gcd(g,a[i]);
        }
        if(g==1)puts("setwise coprime");
        else {
            puts("not coprime");
        }
    }
}
