#ifdef _MSC_VER
#include <__msvc_all_public_headers.hpp>
#undef min
#undef max
#else
#define NDEBUG
#include <bits/stdc++.h>
#endif

using namespace std;
using large = long long;

int main()
{
    int n;
    cin >> n;
    auto a = vector<int>(n);
    for (auto& a_i : a) {
        cin >> a_i;
    }

    auto factors = vector<set<int>>(1'000'005);
    auto having_factor = vector<set<int>>(1'000'005);


    for (auto xit : a) {
        const auto xval = xit;
        auto x = xit;

        if (x % 2 == 0) {
            do { x /= 2; } while (x % 2 == 0);
            having_factor[2].insert(x);
            factors[xval].insert(2);
        }
        if (x % 3 == 0) {
            do { x /= 3; } while (x % 3 == 0);
            having_factor[3].insert(x);
            factors[xval].insert(3);
        }

        for (int d = 5; d * d <= x;) {
            if (x % d == 0) {
                do { x /= d; } while (x % d == 0);
                having_factor[d].insert(x);
                factors[x].insert(d);
            }
            d += 2;
            if (x % d == 0) {
                do { x /= d; } while (x % d == 0);
                having_factor[d].insert(x);
                factors[x].insert(d);
            }
            d += 4;
        }

        having_factor[1].insert(xval);
        having_factor[x].insert(xval);
        factors[xval].insert(1);
        factors[xval].insert(x);
    }

    auto num_pairwise = 0;
    for (auto i = 0; i < n; ++i) {
        auto share_factors = size_t{0};
        for (auto f : factors[a[i]]) {
            if (f == 1) continue;
            share_factors = max(share_factors, having_factor[f].size());
        }
        if (share_factors == 1) {
            num_pairwise++;
        }
    }
    if (num_pairwise == n) {
        cout << "pairwise coprime" << endl;
        return 0;
    }

    auto tmp = a[0];
    for (int i = 0; i < n; ++i) {
        tmp = gcd(tmp, a[i]);
    }
    if (tmp == 1) {
        cout << "setwise coprime" << endl;
        return 0;
    }

    cout << "not coprime" << endl;
    return 0;
}
