#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define fi first
#define se second
long long mo = 1e9 + 7;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
typedef pair<ll,Pll> PlP;
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
template<class A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}cout << "\n";}
ld PI=3.14159265358979323846;

int main(){
    ll N;
    cin >> N;
    vector<ll> A(N), v(1000010);
    rep(i,N){
        cin >> A[i];
        v[A[i]]++;
    }
    bool flag = 1;
    REP(i,2,1000010){
        ll cnt = 0;
        for(ll j=i; j<1000010; j+=i){
            cnt += v[j];
        }
        if(cnt > 1){
            flag = 0;
            break;
        }
    }
    rep(i,1000010){
        if(v[i] > 1){
            flag = 0;
            break;
        }
    }
    if(flag){
        cout << "pairwise coprime" << endl;
        return 0;
    }
    ll now = A[0];
    rep(i,N){
       now =  __gcd(now,A[i]);
    }
    if(now == 1){
        cout << "setwise coprime" << endl;
        return 0;
    }
    cout << "not coprime" << endl;
}