#include <iostream>
#include <vector>
#include <numeric>

using namespace std;

const int MOD = 1e9 + 7;

int main(void) {
    int n;
    cin >> n;
    vector<int> A(n);
    for (int &a : A) {
        cin >> a;
    }

    int l, r, p;
    l = r = p = A[0];
    for (int i = 1; i < n; i++) {
        p = (p * A[i]) % MOD;
        l = lcm(l, A[i]) % MOD;
        r = gcd(r, A[i]);
    }

    if (l == p) {
        cout << "pairwise coprime" << endl;
    } else if (r == 1) {
        cout << "setwise coprime" << endl;
    } else {
        cout << "not coprime" << endl;
    }

    return 0;
}

