#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()

using ll = long long;
using ld = long double;
using namespace std;

const ll inf = 2e18;
const ll mod = 1e9 + 7;
const ll N = 1e6 + 5;

int n, primes[N], a[N], ok = 0;

map<int, int> cnt;

void pf(int n) {
    int f = 0;
    while (n % 2 == 0) {
        n /= 2;
        f = 1;
    }

    if (f and cnt[2]) {
        ok = 1;
        return;
    }

    cnt[2]++;

    for (int i = 3; i * i <= n; i += 2) {
        f = 0;
        while (n % i == 0) n /= i, f = 1;
        if (f and cnt[i]) {
            ok = 1;
            return;
        }
        cnt[i]++;
    }


    if (n > 0) {
        if (cnt[n]) {
            ok = 1;
            return;
        }

        cnt[n]++;
    }
}

void code() {
    cin >> n;
    for (int i = 0; i < n; i++) cin >> a[i];

    for (int i = 0; i < n; i++) {
        pf(a[i]);
    }

    if (ok) {
        cout << "pairwise coprime\n";
        return;
    }

    vector<int> suff(n + 1, 0); int gc = 0;
    for (int i = n - 1; i >= 0; i--) {
        suff[i] = __gcd(suff[i + 1], a[i]);
        gc = __gcd(gc, a[i]);
    }

    if (gc == 1) {
        cout << "setwise coprime\n";
        return;
    }

    cout << "not coprime\n";
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int t = 1;
    // cin>>t;

    while (t-- > 0) {
        code();
    }
}