#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
const int MOD = 1e9;

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) sum = (sum * a[i]) % MOD;
    rep(i, n - 1) {
        sum /= a[i];
        sum = (sum % MOD + MOD) % MOD;
        if (__gcd(a[i], sum) != 1) {
            if (sw != 1)
                cout << "not coprime" << endl;
            else
                cout << "setwise coprime" << endl;
            return 0;
        }
    }

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