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

template <class T>
vector<pair<T, T>> prime_factorization(T n) {
    vector<pair<T, T>> ret;
    for (T i = 2; i * i <= n; i++) {
        T cnt = 0;
        while(n % i == 0) { n /= i; cnt++; }
        if(cnt != 0) ret.emplace_back(i, cnt);
    }
    if (n != 1) ret.emplace_back(n, 1);
    return ret;
}
int main(){
    int64_t n, g; bool flg = true; cin >> n;
    vector<int64_t> a(n);
    for (auto i = 0; i < n; i++) {
        cin >> a[i];
        g = (i == 0) ? a[i] : gcd(g, a[i]);
    }
    map<int, int> cnt;
    for (auto i = 0; i < n; i++) {
        auto p = prime_factorization(a[i]);
        for (auto & elm : p) cnt[elm.first]++;
    }
    for (auto & elm : cnt) {
        if(elm.second > 1) { flg = false; break; }
    }
    if(flg) cout << "pairwise coprime" << endl;
    else if(g == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
    return 0;
}