#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define FOR(i, N) for (long i = 0; i < (N); i++)

vector<int> Eratosthenes(const int N) {
    vector<bool> is_prime(N + 1);
    for (int i = 0; i <= N; i++) {
        is_prime[i] = true;
    }
    vector<int> P;
    for (int i = 2; i <= sqrt(N); i++) {
        if (is_prime[i]) {
            for (int j = 2 * i; j <= N; j += i) {
                is_prime[j] = false;
            }
            P.emplace_back(i);
        }
    }
    return P;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int N;
    cin >> N;
    vector<int> A(N);

    int max_A = 0;
    FOR(n, N) {
        cin >> A[n];
        if (max_A < A[n]) {
            max_A = A[n];
        }
    }
    vector<int> Prime = Eratosthenes(max_A);

    bool pairwise_coprime = true;
    bool setwise_coprime = true;

    int g = A[0];
    FOR(n, N) {
        g = __gcd(g, A[n]);
    }
    if (g > 1) {
        cout << "not coprime" << endl;
        return 0;
    }

    for (int p : Prime) {
        int count = 0;
        FOR(n, N) {
            if (A[n] % p == 0) {
                count++;
            }
        }
        if (count > 1) {
            cout << "setwise coprime" << endl;
            return 0;
        }
    }

    cout << "pairwise coprime" << endl;

    return 0;
}
