#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef tabr
#include "library/debug.cpp"
#else
#define debug(...)
#endif

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    vector<int> a(n);
    int g = 0;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        g = __gcd(a[i], g);
    }
    if (g != 1) {
        cout << "not ";
    } else {
        vector<int> b(1000001, 1);
        b[0] = b[1] = 0;
        for (int i = 2; i <= 1000000; i++) {
            for (int j = 2 * i; j <= 1000000; j += i) {
                b[j] = 0;
            }
        }
        vector<int> p;
        for (int i = 0; i < 1000000; i++) {
            if (b[i]) {
                p.emplace_back(i);
            }
        }
        vector<int> c(1000001);
        bool ok = true;
        for (int i = 0; i < n; i++) {
            if (b[a[i]]) {
                c[a[i]]++;
                if (c[a[i]] >= 2) {
                    ok = false;
                }
            } else {
                for (int j : p) {
                    if (j * j > a[i]) {
                        c[a[i]]++;
                        if (c[a[i]] >= 2) {
                            ok = false;
                        }
                        break;
                    }
                    if (a[i] % j == 0) {
                        if (c[j]) {
                            ok = false;
                            break;
                        }
                        c[j] = 1;
                    }
                    while (a[i] % j == 0) {
                        a[i] /= j;
                    }
                }
            }
            if (!ok) {
                break;
            }
        }
        if (ok) {
            cout << "pairwise ";
        } else {
            cout << "setwise ";
        }
    }
    cout << "coprime" << '\n';
    return 0;
}