#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<P,ll> PLL;
typedef pair<P,P> PP;
typedef vector<ll> VECLL;
typedef vector<P> VECP;
typedef priority_queue<P,VECP,greater<P> > PQP;
typedef priority_queue<ll, VECLL, greater<ll> > PQll;

#define rep(i,a,n) for(ll i = a;i < n;i++)
#define rrep(i,a,n) for(ll i = n; i >= a;i--)
#define index_check(i,n) if(i > n-1 || i < 0) continue;
#define LINF (ll)1e18
#define INF (int)1e9
#define fs first
#define sc second

template<typename T>
ll sz(vector<T> vec){ return (ll)vec.size(); }
ll sz(string s){ return (ll)s.size(); }

ll gcd(ll a,ll b){
    if(!b) return a;
    return gcd(b,a%b);
}



int main(){

    ll n;
    cin >> n;
    ll a[n] = {};
    ll memo;
    ll amax = 0;
    map<ll,ll> m;
    rep(i,0,n){
        cin >> a[i];
        if(i == 0) memo = a[i];
        else memo = gcd(memo,a[i]);
        
        if(m.count(a[i]) == 0) m[a[i]] = 1;
        else m[a[i]]++;
    }

    if(memo != 1){
        cout << "not coprime" << endl;
        return 0;
    }


    for(ll i = 2; i*i <= 1000000; i++){
        ll cnt = 0;
        for(ll j = 1; i*j <= 1000000; j++){\
            if(m.count(i*j) != 0) cnt += m[i*j];
        }
        if(cnt > 1){
            cout << "setwise coprime" << endl;
            return 0;
        }
    }

    rep(i,0,n){
        if(m[a[i]] > 1 && a[i] != 1){
            cout << "setwise coprime" << endl;
            return 0;
        }
    }
    cout << "pairwise coprime" << endl;
    
    return 0;
}


