#include <bits/stdc++.h>
using namespace::std;

#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()

typedef long long ll;
typedef array<int, 3> tri;
typedef long double ld;

template <class T> istream& operator>>(istream& I, vector<T>& v) {for (T &e: v) I >> e; return I;}
template <class T> ostream& operator<<(ostream &O, const vector<T>& v) {for (const T &e: v) O << e << ' '; return O;}


bool setwise(const vector<int>& a) {
        int g = 0;
        for (int i = 0; i < sz(a); i++) {
                g = __gcd(g, a[i]);
        }

        return g == 1;
}

#define MAXN   1000001

int spf[MAXN];
void sieve() {
        spf[1] = 1;
        for (int i = 2; i < MAXN; i++) spf[i] = i;
        for (int i = 4; i < MAXN; i += 2) spf[i] = 2;
        for (int i = 3; i * i < MAXN; i++) {
                if (spf[i] == i) {
                        for (int j = i * i; j < MAXN; j += i)
                                if (spf[j] == j) spf[j] = i;
                }
        }
}


void factorize(int x, map<int, set<int>>& m) {
        int y = x;
        while (x != 1) {
                m[spf[x]].emplace(y);
                assert(spf[x] != 0);
                x /= spf[x];
        }
}



bool pairwise(vector<int> a) {
        sort(all(a));
        map<int, set<int>> pf;
        for (auto x: a) {
                factorize(x, pf);
        }

        for (auto it: pf)  {
                if (sz(it.second) >= 2) return 0;
        }

        return 1;
}


void _main() {
        sieve();
        int n; cin >> n;
        vector<int> a(n); cin >> a;
        if (pairwise(a)) cout << "pairwise coprime";
        else if (setwise(a)) cout << "setwise coprime";
        else cout << "not coprime";
}



signed main() {
        ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
//        freopen("input.txt", "r", stdin);
        int _t = 1;
//        cin >> _t;
        while (_t--) _main();
        return 0;
}
