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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int N;
    cin >> N;
    vector<int> A(N);
    int GCD = A[0];
    for (int i = 0; i < N; ++i) {
        cin >> A[i];
        GCD = __gcd(A[i], GCD);
    }
    if (GCD != 1) {
        cout << "not coprime\n";
        return 0;
    }
    vector<bool> used(1E6, false);
    for (int i = 0; i < N; ++i) {
        int cur = A[i];
        for (int j = 2; j * j <= cur; ++j) {
            if (cur % j == 0) {
                if (used[j]) {
                    cout << "setwise coprime\n";
                    return 0;
                }
                used[j] = true;
                while (cur % j == 0) {
                    cur /= j;
                }
            }
        }
        if (used[cur]) {
            cout << "setwise coprime\n";
            return 0;
        }
        used[cur] = true;
    }
    cout << "pairwise coprime\n";
    return 0;
}