/*
    Author:    DreamCat4er
    Created:   29.08.2020 16:09:23
*/
#include <bits/stdc++.h>
using namespace std;

int n;
int a[(int)(1e6 + 100)], cnt[(int)(1e6 + 100)];
set <int> s[(int)(1e6 + 100)];

void pc() {
    cout << "pairwise coprime\n";
}

void sc() {
    cout << "setwise coprime\n";
}

void nc() {
    cout << "not coprime\n";
}

void solve() {
    cin >> n;
    for (int i = 1; i <= (int)(1e6); ++i)
        s[i].clear();
    for (int i = 0; i < n; ++i)
        cin >> a[i];

    sort(a, a + n);

    for (int i = 0; i < n; ++i) {
        s[a[i]].insert(a[i]);
        for (int j = 2; j * j <= a[i]; ++j) {
            if (a[i] % j)
                continue;

            s[j].insert(a[i]);
            s[a[i] / j].insert(a[i]);
        }
    }

    bool gd = 1;
    for (int i = 2; i <= (int)(1e6); ++i)
        gd &= (int)(s[i].size()) <= 1;

    if (gd) {
        pc();
        return;
    }

    int gcd = a[0];
    for (int i = 1; i < n; ++i)
        gcd = __gcd(gcd, a[i]);

    if (gcd == 1) sc();
        else nc();
}

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
                
    #ifdef _LOCAL
        int t;
        cin >> t;
        for (int _t = 0; _t < t; ++_t) {
            cout << "Case " << _t << " :\n";
            solve();
            cout << "\n";
        }
    #else
        solve();
    #endif // _LOCAL

    return 0;
}