#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;
}


bool pairwise(vector<int>& a) {
        sort(all(a));
        vector<bool> p((int) 1e6 + 1, 1);
        for (int x = 2; x * x <= 1e6; x++) {
                if (p[x]) {
                        int cnt = 0;
                        for (auto i: a) {
                                if (i % x == 0) cnt++;
                        }
                        if (cnt >= 2) return 0;
                }
        }

        return 1;
}


void _main() {
        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;
}
