#include <bits/stdc++.h>
using namespace std;
using Int = long long;
#define PUTS(x) std::cout << (x) << endl;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define ALL(v) (v).begin(), (v).end()
#define SZ(x) ((int)(x).size())

int main() {
    Int n;
    cin >> n;

    auto getPrimes = [](Int x) -> set<Int> {
        auto p = 2;
        auto result = set<Int>();
        while (x > 1) {
            if (x % p == 0) {
                result.insert(p);
                x /= p;
            } else {
                p++;
            }
        }
        return result;
    };

    auto pairwise = true;
    set<Int> s;
    Int g;
    rep(i, n) {
        Int a;
        cin >> a;
        if (pairwise) {
            auto t = getPrimes(a);
            set<Int> intersect;
            set_intersection(ALL(s), ALL(t), inserter(intersect, intersect.begin()));
            if (SZ(intersect) > 0) {
                pairwise = false;
            }
            set_union(ALL(s), ALL(t), inserter(s, s.begin()));
        }

        if (i == 0) {
            g = a;
        } else {
            g = gcd(g, a);
        }
    }
    if (g > 1) {
        PUTS("not coprime")
    } else if (pairwise) {
        PUTS("pairwise coprime")
    } else {
        PUTS("setwise coprime")
    }
}
