#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr long long MOD = 1000000007;
constexpr long long INF = 1LL << 60;
const long double PI = acosl(-1.0);
constexpr long double EPS = 1e-11;
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
void factorization(long long n,map<ll,ll>& mp){
    for(long long i=2;i*i<=n;i++){
        while(n%i==0){
            mp[i]++;
            n /= i;
        }
     }
     if(!(n == 1)) mp[n]++;
}
int main(){
    ll n;
    cin >> n;
    vector<ll> a(n);
    for (ll i = 0; i < n; i++) cin >> a[i];
    ll gg = 0;
    map<ll, ll> ans;
    for (ll i = 0; i < n; i++) gg = gcd(gg, a[i]);
    bool flag1 = (gg == 1 ? true : false);
    ll tmp = 0;
    for (ll i = 0; i < n; i++) {
        factorization(a[i], ans);
    }
    bool flag2 = true;
    for (ll i = 0; i < n; i++) {
        map<ll, ll> tmp;
        factorization(a[i], tmp);
        for (auto i:tmp){
            if (i.second - ans[i.first] != 0) flag2 = false;
        }
    }
    if (flag2) cout << "pairwise coprime" << endl;
    else if(flag1)
        cout << "setwise coprime" << endl;
    else
        cout << "not coprime" << endl;
}
