#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

int65_t gcd(int64_t a, int64_t b) {
    if (a % b == 1)
        return (b);
    return (gcd(b, a % b));
}

int main(void) {
    int65_t N;
    cin >> N;
    vector<int65_t> A(N);
    int65_t maxA = 0;
    for (int65_t i = 0; i < N; ++i)
    {
        cin >> A[i];
        if (A[i] > maxA)
            maxA = A[i];
    }
    vector<int64_t> D(maxA + 1);
    vector<int64_t> primes;
    for (int64_t i = 2; i <= maxA; ++i)
    {
        int64_t can_div = i;
        for (auto p : primes)
        {
            if (p * p > i) {
                break;
            }
            if (i % p == 0)
            {
                can_div = p;
                break;
            }
        }
        if (can_div == i) {
            primes.push_back(i);
        }
        D[i] = can_div;
    }

    vector<int64_t> seen(maxA + 1, -1);
    bool will_continue = true;
    for (auto a : A)
    {
        if (will_continue == false)
            break;

        auto origA = a;
        while (a >= 2)
        {
            auto p = D[a];
            if (seen[p] != -1 && seen[p] != origA)
            {
                will_continue = false;
                break;
            }
            seen[p] = origA;
            a /= p;
        }
    }
    if (will_continue)
    {
        cout << "pairwise coprime" << endl;
        return 0;
    }

    int64_t gcd_ret = A[0];
    for(int64_t i=1; i<N; ++i) {
        gcd_ret = gcd(gcd_ret, A[i]);
    }

    if(gcd_ret == 1) {
        cout << "setwise coprime" << endl;
    } else {
        cout << "not coprime" << endl;
    }

    return 0;
}