#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<vector<int>>(1'000'005);
    auto having_factor = vector<unordered_multiset<int>>(1'000'005);


    for (const auto a_i : a) {
        auto x = a_i;
        factors[a_i].clear();

        having_factor[1].insert(a_i);
        factors[a_i].push_back(1);

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

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

        if (x > 1) {
            having_factor[x].insert(a_i);
            factors[a_i].push_back(x);
        }
    }

    auto all_factors = set<int>();
    for (auto i = 0; i < n; ++i) {
        for (auto f : factors[a[i]]) {
            all_factors.insert(f);
        }
    }

    auto sharing = false;
    for (auto f : all_factors) {
        if (f == 1) continue;
        if (having_factor[f].size() > 1) {
            sharing = true;
            break;
        }
    }
    if (!sharing) {
        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;
}
