#include <bits/stdc++.h>
#include <vector> 
# include <cstdint>
#define FOR(i,l,r) for(int i=(l);i<(r);++i)
#define RFOR(i,l,r) for(int i=(l);i>=(int)(r);i--)
#define rep(i,n)  FOR(i,0,n)
#define rrep(i,n)  RFOR(i,n-1,0)

using namespace std;
//#define int long long
using ll = long long;
const int MX = 1e6;
const ll inf = 1e13;
const int mod = 1e9+7;
map<ll, ll> prime_factors(ll n) {
    map<ll, ll> res;
    if(n == 1) { // n=1 の素因数分解は n^1
        res[n] = 1;
        return res;
    }
    for(ll i = 2, _n = n; i*i <= _n; ++i) {
        while(n % i == 0) {
            ++res[i]; // 素数i^{res[i]}
            n /= i;
        }
    }
    if(n != 1) res[n] = 1;
    return res;
}
signed main() {
    int n;
    cin >> n;
    vector<int> a(n);
    vector<int> b(MX+1);
    bool f = false;
    rep(i,n) {
        cin>> a[i];
        if(a[i]==1) f = true;
    }
    sort(a.begin(),a.end());
    
    if(f) {
        int ans = __gcd(a[0],a[1]);
        FOR(i,2,n) {
            ans = __gcd(ans,a[i]);
        }
        if(ans==1)cout << "setwise coprime" << endl;
        else cout << "not coprime" << endl;
        return 0;
    }
    int tmp = a[0];
    FOR(i,1,n){
        map<ll, ll> pf = prime_factors(a[i]);
        for(auto now:pf) {
            if(now.first==1) continue;
            if(b[now.first]>0) {
                f=true;
                //cout << now.first << endl;
                break;
            }
            b[now.first]++;
        }
        if(f)break;
    }
    if(f) {
        int ans = __gcd(a[0],a[1]);
        FOR(i,2,n) {
            ans = __gcd(ans,a[i]);
        }
        if(ans==1)cout << "setwise coprime" << endl;
        else cout << "not coprime" << endl;
        return 0;
    }else {
        cout << "pairwise coprime" << endl;
    }
    return 0;
}

