#include <bits/stdc++.h>
#define endl '\n'
#define ll long long
#define double long double
using namespace std;
const ll inf = 1000000000000000000;

ll n, a[1000005], x;
set<ll> myset;
bool f = true;
bool is_prime(ll x) {
    if (x <= 1)
        return false;
    for (ll i = 2; i <= (ll)sqrt(x); ++i)
        if (x % i == 0)
            return false;
    return true;
}
void factorize(ll x) {
    ll tec = 1;
    if (is_prime(x)) {
        if (myset.find(x) != myset.end())
            f = false;
        myset.insert(x);
        return;
    }
    bool flag;
    while (x > 1) {
        ++tec;
        flag = false;
        while (x % tec == 0) {
            flag = true;
            x /= tec;
        }
        if (flag) {
            if (myset.find(tec) != myset.end())
                f = false;
            myset.insert(tec);
            if (is_prime(x)) {
                if (myset.find(x) != myset.end())
                    f = false;
                myset.insert(x);
                return;
            }
        }
    }
}

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin >> n;
    for (ll i = 1; i <= n; ++i)
        cin >> a[i];
    x = a[1];
    for (ll i = 2; i <= n; ++i) {
        x = __gcd(a[i], x);
        myset.insert(a[i]);
    }
    if ((ll)myset.size() < n) {
        if (x == 1) {
            cout << "setwise coprime";
            return 0;
        }
        cout << "not coprime";
        return 0;
    }
    myset.clear();
    for (ll i = 1; i <= n; ++i)
        factorize(a[i]);
    if (f) {
        cout << "pairwise coprime";
        return 0;
    }
    if (!f && x == 1) {
        cout << "setwise coprime";
        return 0;
    }
    cout << "not coprime";
    return 0;
}
