#include <bits/stdc++.h>

using namespace std;

int gcd(int a, int b) {
    if (a == 0) return b;
    while (b != 0) {
        if (a > b) {
            a = a - b;
        } else {
            b = b - a;
        }
    }
    return a;
}

int main() {
    int amax = 1000001;
    int factors[amax] = {0};
    for (int i = 2; i < amax; i++) {
        if (factors[i] != 0) {
            continue;
        }
        for (int j = 1; j < amax; j++) {
            if (j * i >= amax) {
                break;
            }
            if (factors[j * i] != 0) {
                continue;
            }
            factors[j * i] = i;
        }
    }

    int n;
    cin >> n;
    int a[n];

    map<int, set<int>> primes;

    int d = 0;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        d = gcd(d, a[i]);
        while (a[i] > 1) {
            primes[i].insert(factors[a[i]]);
            a[i] /= factors[a[i]];
        }
    }

    map<int, int> count;
    for (int i = 0; i < n; i++) {
        for (int x : primes[i]) {
            count[x]++;
        }
    }

    bool pairwise = true;
    for (auto c : count) {
        pairwise &= c.second == 1;
    }

    if (pairwise) {
        cout << "pairwise coprime\n";
    } else if (d == 1) {
        cout << "setwise coprime\n";
    } else {
        cout << "not coprime\n";
    }
}