#include <bits/stdc++.h>
#define DAU  ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define PLEC exit(0);
using namespace std;
const int N(1e6 + 5);
unordered_map<int, int> freq;
int n, x, d, p;
bool ok(true), curr;
int main() {
    DAU
    cin >> n;
    vector<vector<int>> factori(n + 1);
    vector<int> v(n + 1);
    for (int i = 1; i <= n; ++i) {
        cin >> x;
        v[i] = x;
        d = 2;
        while (x != 1) {
            p = 0;
            while (x % d == 0)
                x /= d, p = 1;
            if (p) {
                ++freq[d];
                factori[i].emplace_back(d);
            }
            if (d == 2)
                d = 3;
            else d += 2;
            if (d * d > x)
                d = x;
        }
    }
    for (int i = 1; i <= n && ok; ++i)
        for (const int& d : factori[i]) {
            if (freq[d] != 1)
                ok = false;
                break;
        }
    if (ok) {
        cout << "pairwise coprime";
        PLEC
    }
    d = v[1];
    for (int i = 2; i <= n; ++i)
        d = __gcd(d, v[i]);
    if (d == 1)
        cout << "setwise coprime";
    else cout << "not coprime";
    PLEC
}
