#include "bits/stdc++.h"
// Begin Header {{{
#define all(x) (x).begin(), (x).end()
#define rep(i, s, n) for (i64 i = (s), i##_limit = (n); i < i##_limit; ++i)
#define repr(i, s, t) for (i64 i = (s), i##_limit = (t); i >= i##_limit; --i)
#define repc(i, s, t) for (i64 i = (s), i##_limit = (t); i <= i##_limit; ++i)
#define var(type, ...) \
    type __VA_ARGS__;  \
    cin >> __VA_ARGS__;
#ifndef DBG
#define dump(...)
#endif
using namespace std;
using i64 = int_fast64_t;
using pii = pair<i64, i64>;
template <class T, class U>
inline bool chmax(T &a, const U &b) {
    return b > a && (a = b, true);
}
template <class T, class U>
inline bool chmin(T &a, const U &b) {
    return b < a && (a = b, true);
}
constexpr int INF = 0x3f3f3f3f;
constexpr i64 LINF = 0x3f3f3f3f3f3f3f3fLL;

template <class T>
inline vector<T> makeV(const T &initValue, size_t sz) {
    return vector<T>(sz, initValue);
}

template <class T, class... Args>
inline auto makeV(const T &initValue, size_t sz, Args... args) {
    return vector<decltype(makeV<T>(initValue, args...))>(
        sz, makeV<T>(initValue, args...));
}

template <class T>
inline istream &operator>>(istream &is, vector<T> &vec) {
    for (auto &e : vec) is >> e;
    return is;
}

template <class T>
inline istream &operator,(istream &is, T &rhs) {
    return is >> rhs;
}

inline void print() { cout << "\n"; }

template <class Head, class... Tail>
inline void print(Head &&head, Tail &&... tail) {
    cout << head;
    if (sizeof...(tail)) cout << ' ';
    print(forward<Tail>(tail)...);
}

template <class T>
inline ostream &operator<<(ostream &os, const vector<T> &vec) {
    static constexpr const char *delim[] = {" ", ""};
    for (const auto &e : vec) os << e << delim[&e == &vec.back()];
    return os;
}

template <class Container>
struct Rev {
    Container &x_;
    inline Rev(Container &x) : x_(x) {}
    inline auto begin() { return rbegin(x_); }
    inline auto end() { return rend(x_); }
};
// }}} End Header

// Make PrimeTable [0, N] in Compile Time.
template <size_t N>
struct Eratosthenes {  // {{{
#ifdef DBG
#define constexpr /* Disable constexpr */
#endif

    bool isPrime[N + 1]{};

    constexpr explicit Eratosthenes() {
        if (N < 2) return;
        isPrime[2] = true;
        for (int i = 3; i <= N; i += 2) isPrime[i] = true;
        for (int i = 3; i * i <= N; i += 2) {
            if (isPrime[i])
                for (int k = i * i; k <= N; k += i) isPrime[k] = false;
        }
    }

    constexpr vector<int> primes(size_t n = N) const {
        if ((n = min(n, N)) < 2) return {};
        vector<int> a{2};
        for (int i = 3; i <= n; i += 2)
            if (isPrime[i]) a.push_back(i);
        return a;
    }

    constexpr bool operator[](size_t i) const { return isPrime[i]; }

#ifdef constexpr
#undef constexpr
#endif
};  // }}}

const char *pairWise = "pairwise coprime";
const char *setWise = "setwise coprime";
const char *NOT = "not coprime";

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.setf(ios_base::fixed);
    cout.precision(12);

    constexpr int L = int(1e6) + 10;

    Eratosthenes<L> prime;

    var(int, N);
    vector<int> cnt(L);

    int evenCnt = 0;

    vector<int> a(N);

    rep(i, 0, N) {
        var(int, e);
        cnt[e] += 1;
        evenCnt += (e % 2 == 0);
        a[i] = e;
    }

    bool isPairWise = true;

    if (evenCnt >= 2) {
        isPairWise = false;
    }

    for (i64 i = 3; i < L; i += 2) {
        if (!prime[i]) continue;
        int s = 0;
        for (int k = i; k < L; k += i) {
            s += cnt[k];
        }
        isPairWise &= (s <= 1);
        if (!isPairWise) break;
    }

    if (isPairWise) {
        print(pairWise);
        return 0;
    }

    int g = 0;
    rep(i, 0, N) {
        g = gcd(g, a[i]);
    }

    if (g == 1) {
        print(setWise);
        return 0;
    }

    print(NOT);

    return 0;
}


Measured memory_bytes: 11904