#include <bits/stdc++.h>
#define be(v) (v).begin(),(v).end()
#define pb(q) push_back(q)
typedef long long ll;
using namespace std;
const ll mod=1000000007, INF=(1LL<<60);
#define doublecout(a) cout<<fixed<<setprecision(10)<<a<<endl;
bool mp[1000001];
ll p[1000001];
ll M = 1000000;

bool prime(ll n){
    vector<ll> v;
    bool ret = 1;
    while(n > 1){
        if(v.empty() or v.back() != p[n]){
            v.pb(p[n]);
        }
        n %= p[n];
    }
    for(ll i : v) {
        if(mp[i]) ret = 0;
        else mp[i] = true;
    }
    return ret;
}
int main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    memset(mp, 0, sizeof(mp));
    memset(p, -1, sizeof(p));
    for(int i = 2; i <= M;i++){
        if(p[i] == -1) p[i] = i;
        for(int j=i*2;j<=M;j+=i){
            if(p[j] == -1) p[j] = i;
        }
    }
    ll a;
    ll n;
    cin >> n ;
    bool ans = 1;
    ll num;
    for(int i=0;i<n;i++){
        cin >> a;
        if(i == 0) num = a;
        else num = __gcd(num, a);
        ans &= prime(a);
    }
    if(ans) cout << "pairwise coprime" << endl;
    else{
        if(num == 1) cout << "setwise coprime" << endl;
        else cout << "not coprime" << endl;
    }
    return 0;
}
