#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;
}
const long long MAX_N = 2e7;
long long min_factor[MAX_N] = {};
void InitFact(){
    for (long long i = 2; i < MAX_N;i++){
        if (min_factor[i] < i) continue;
        for (long long j = i + i; j < MAX_N;j+=i){
            min_factor[j] = i;
        }
    }
    return;
}
void Fast_Factorize(long long n,map<long long,long long>&mp){
    while(n>1){
        mp[min_factor[n]]++;
        n /= min_factor[n];
    }
    return;
}
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);
	InitFact();
    for (ll i = 0; i < n; i++) {
        Fast_Factorize(a[i], ans);
    }
    bool flag2 = true;
    for (ll i = 0; i < n; i++) {
        map<ll, ll> tmp;
        Fast_Factorize(a[i], tmp);
        for (auto i:tmp){
            if (i.second - ans[i.first] != 0) {
                flag2 = false;
                goto end;
            }
        }
    }
    end:
    if (flag2) cout << "pairwise coprime" << endl;
    else if(flag1)
        cout << "setwise coprime" << endl;
    else
        cout << "not coprime" << endl;
}
