#include <bits/stdc++.h>
using namespace std;
#define all(n) begin(n), end(n)
const long long INF = numeric_limits<long long>::max();
typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int>> vvint;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef unsigned long long ull;
template <class T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
vector<T> make_v(size_t a) { return vector<T>(a); }

template <typename T, typename... Ts>
auto make_v(size_t a, Ts... ts)
{
    return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template <typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type
fill_v(T &t, const V &v) { t = v; }

template <typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type
fill_v(T &t, const V &v)
{
    for (auto &e : t)
        fill_v(e, v);
}
const int M = 1e6 + 1;
vint table(M);
vint pf(int n)
{
    vint res;
    while (n > 1)
    {
        res.push_back(table[n]);
        while (n % table[n] == 0 and n != 1)
            n /= table[n];
    }
    return res;
}
int main()
{

    iota(all(table), 0);
    for (ll i = 2; i * i < M; i++)
    {
        if (table[i] < i)
            continue;
        for (ll j = i; i * j < M; j++)
        {
            if (table[i * j] == i * j)
                table[i * j] = i;
        }
    }

    int N;

    cin >> N;
    vint cnt(M);
    int g = 0;
    for (size_t i = 0; i < N; i++)
    {
        int a;
        cin >> a;
        auto p = pf(a);
        for (auto &&d : p)
        {
            cnt[d]++;
        }
        g = gcd(a, g);
    }
    bool pw = true;
    for (auto &&i : cnt)
    {
        if (i > 1)
            pw = false;
    }
    if (pw)
    {
        cout << "pairwise coprime";
    }
    else if (g == 1)
    {
        cout << "setwise coprime";
    }
    else
    {
        cout << "not coprime";
    }

    return 0;
}