#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include "bits/stdc++.h"

// Begin Header {{{
using namespace std;

#ifndef DEBUG
#define dump(...)
#endif

#define all(x) x.begin(), x.end()
#define rep(i, b, e) for (intmax_t i = (b), i##_limit = (e); i < i##_limit; ++i)
#define reps(i, b, e) for (intmax_t i = (b), i##_limit = (e); i <= i##_limit; ++i)
#define repr(i, b, e) for (intmax_t i = (b), i##_limit = (e); i >= i##_limit; --i)
#define var(Type, ...) Type __VA_ARGS__; input(__VA_ARGS__)

constexpr size_t    operator""_zu(unsigned long long value) { return value; };
constexpr intmax_t  operator""_jd(unsigned long long value) { return value; };
constexpr uintmax_t operator""_ju(unsigned long long value) { return value; };

constexpr int INF = 0x3f3f3f3f;
constexpr intmax_t LINF = 0x3f3f3f3f3f3f3f3f_jd;

template <class T, class Compare = less<>>
using MaxHeap = priority_queue<T, vector<T>, Compare>;
template <class T, class Compare = greater<>>
using MinHeap = priority_queue<T, vector<T>, Compare>;

inline void input() {}
template <class Head, class... Tail>
inline void input(Head&& head, Tail&&... tail) {
    cin >> head;
    input(forward<Tail>(tail)...);
}

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

inline void output() { cout << "\n"; }
template <class Head, class... Tail>
inline void output(Head&& head, Tail&&... tail) {
    cout << head;
    if (sizeof...(tail)) {
        cout << " ";
    }
    output(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 T>
inline vector<T> makeVector(const T &initValue, size_t sz) {
    return vector<T>(sz, initValue);
}

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

template <class Func>
class FixPoint : Func {
public:
    explicit constexpr FixPoint(Func&& f) noexcept : Func(forward<Func>(f)) {}

    template <class... Args>
    constexpr decltype(auto) operator()(Args&&... args) const {
        return Func::operator()(*this, std::forward<Args>(args)...);
    }
};

template <class Func>
static inline constexpr decltype(auto) makeFixPoint(Func&& f) noexcept {
    return FixPoint<Func>{forward<Func>(f)};
}

template <class Container>
struct reverse_t {
    Container &c;
    reverse_t(Container &c) : c(c) {}
    auto begin() { return c.rbegin(); }
    auto end() { return c.rend(); }
};

template <class Container>
auto reversed(Container &c) {
    return reverse_t<Container>(c);
}

template <class T>
inline bool chmax(T &a, const T &b) noexcept {
    return b > a && (a = b, true);
}

template <class T>
inline bool chmin(T &a, const T &b) noexcept {
    return b < a && (a = b, true);
}

template <class T>
inline T diff(const T &a, const T &b) noexcept {
    return a < b ? b - a : a - b;
}

void ioinit() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.setf(ios_base::fixed);
    cout.precision(10);
}
// End Header }}}

// SmartSieve {{{
class SmartSieve {
    intmax_t L, R, M;
    vector<intmax_t> small;
    vector<vector<intmax_t>> large;
    vector<intmax_t> aux; // aux[i] := large[i] の素因数の積

public:
    SmartSieve(intmax_t L, intmax_t R) : L(L), R(R), M(sqrt(R) + 1) {
        small.resize(M);
        iota(small.begin(), small.end(), 0);
        large.resize(R - L);
        aux.assign(R - L, 1);

        for (intmax_t i = 2; i * i < R; ++i) {
            if (small[i] < i) continue;

            for (intmax_t j = i * i; j < M; j += i) {
                if (small[j] == j) small[j] = i;
            }

            for (intmax_t j = (L + i - 1) / i * i; j < R; j += i) {
                intmax_t k = j;
                do {
                    if (aux[j - L] * aux[j - L] > R) break;

                    large[j - L].emplace_back(i);
                    aux[j - L] *= i;
                    k /= i;
                } while (k % i == 0);
            }
        }
    }

    vector<intmax_t> primeFactorize(intmax_t N) {
        assert(L <= N && N < R);
        vector<intmax_t> ret = large[N - L];
        N /= aux[N - L];
        if (N >= M) {
            ret.emplace_back(N);
            return ret;
        }
        while (N > 1) {
            ret.emplace_back(small[N]);
            N /= small[N];
        }
        return ret;
    }
};
// }}}

signed main() {
    ioinit();

    var(size_t, N);

    vector<intmax_t> a(N);
    input(a);

    const size_t MAX = size_t(1e6);
    vector<intmax_t> min_prime(MAX + 1);
    iota(all(min_prime), 0);
    for (intmax_t i = 2; i * i <= MAX; ++i) {
        if (min_prime[i] < i) continue;
        for (intmax_t j = i * i; j <= MAX; j += i) {
            if (min_prime[j] == j) min_prime[j] = i;
        }
    }

    dump(a);
    for (auto &ai: a) ai = min_prime[ai];
    dump(a);

    bool pc = true;
    vector<bool> exist(MAX + 1, false);
    for (const auto ai: a) {
        if (exist[ai]) {
            pc = false;
        }
        exist[ai] = true;
    }

    intmax_t G = a[0];
    rep(i, 1, N) {
        G = gcd(G, a[i]);
    }

    if (pc) {
        output("pairwise coprime");
    } else if (G == 1) {
        output("setwise coprime");
    } else {
        output("not coprime");
    }

    return 0;
}
