#define _overload(_1, _2, _3, _4, name, ...) name
#define _rep1(Itr, N) _rep3(Itr, 0, N, 1)
#define _rep2(Itr, a, b) _rep3(Itr, a, b, 1)
#define _rep3(Itr, a, b, step) for (llong (Itr) = a; (Itr) < b; (Itr) += step)
#define repeat(...) _overload(__VA_ARGS__, _rep3, _rep2, _rep1)(__VA_ARGS__)

#include <iostream>
#include <vector>
#include <numeric>
using namespace std;
using llong = long long;


llong n;
llong a[1000005];
llong p[10005];
bool x[1000005];
bool table[1000005];

void build() {
    p[0] = 2;
    int idx = 1;

    for (int i = 3; i < 1005; i += 2) {
        if (!table[i]) p[idx++] = i;
        for (int j = i + i; j < 1005; j += i) table[j] = true;
    }
};

int main() {
    build();

    cin >> n;
    repeat(i, n) cin >> a[i];

    llong v = a[0];
    repeat(i, 1, n) {
        v = gcd(v, a[i]);
    }

    bool f = true;
    for (int i = n - 1; i >= 0; i--) {
        llong vs = a[i];
        llong j = 0;

        while (vs > 1 && p[j] > 0) {
            if (vs % p[j] == 0) {
                if (x[p[j]]) f = false;
                x[p[j]] = true;
            }
            while (vs % p[j] == 0) {
                vs /= p[j];
            }
            j++;
        }
    }

    if (f) {
        cout << "pairwize coprime" << endl;
    }
    else if (v == 1) {
        cout << "setwize coprime" << endl;
    }
    else {
        cout << "not coprime" << endl;
    }

    return 0;
};
