#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

const int MAX_N = 1e5 + 5;
const int MAX_L = 20; // ~ Log N
const long long MOD = 1e9 + 7;
const long long INF = 1e9 + 7;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<vi> vvi;

#define rep(i,n) for (int i = 0; i < n; ++i)
#define REP(i,k,n) for (i = k; i <= n; ++i)
#define REPR(i,k,n) for (int i = k; i >= n; --i)

#define LSOne(S) (S & (-S))
#define isBitSet(S, i) ((S >> i) & 1)

int D[100001];
bool factors[100001];

int gcd(int x, int y) {
    if (y == 0) {
        return x;
    }
    return gcd(y, x % y);
}

void solve() {
    int N;
    cin >> N;
    vi v;
    rep(i, N) {
        int x;
        cin >> x;
        v.push_back(x);
    }

    for (int i = 1; i <= 100000; i++) {
        D[i] = i;
    }

    rep(i, 100001) {
        factors[i] = false;
    }

    for (int i = 2; i <= 100000; i++) {
        if (D[i] == i) {
            for (int j = 2; j * i <= 100000; j++) {
                if (D[j*i] == j*i) {
                    D[j*i] = i;
                }
            }
        }
    }
//    cout << D[3] << " " << D[4] << " " << D[5] << endl;
    bool pairWise = true;
    for (int i = 0; i < v.size(); i++) {
        int x = v[i];
        unordered_set<int> s;
        while (D[x] != 1) {
            s.insert(D[x]);
            x /= D[x];
        }
        for (auto f : s) {
            if (factors[f]) {
                pairWise = false;
            }
            factors[f] = true;
        }
        if (!pairWise) {
            break;
        }
    }
    if (pairWise) {
        cout << "pairwise coprime";
        return;
    }

    int d = gcd(v[0], v[1]);
    for (int i = 2; i < v.size(); i++) {
        d = gcd(d, v[i]);
    }
    if (d == 1) {
        cout << "setwise coprime";
    } else {
        cout << "not coprime";
    }
}

//#define LOCAL 1

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);

#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    solve();

    return 0;
}
