#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
vector<bool> p(1e6 + 5);

bool isPrime(const int n) {
    for (int i = 2; i * i <= n; i++) {
        if (n % i == 0) {
            if (p[i]) return true;
            p[i] = true;
        }
    }
    return false;
}

int main() {
    int n;
    cin >> n;
    ll a[n];
    rep(i, n) cin >> a[i];

    ll sw = a[0];
    for (int i = 1; i < n; i++) sw = __gcd(sw, a[i]);

    ll sum = 1;
    rep(i, n) {
        if (isPrime(a[i])) {
            if (sw != 1)
                cout << "not coprime" << endl;
            else
                cout << "setwise coprime" << endl;
            return 0;
        }
    }

    cout << "pairwise coprime" << endl;
    return 0;
}
