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

int main() {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a.at(i);
    }
    
    int gcd_all = 0;
    for (int i = 0; i < n; i++) {
        gcd_all = gcd(gcd_all, a.at(i));
    }
    if (gcd_all != 1) {
        puts("not coprime");
        return 0;
    }

    bool pairwise = true;
    vector<int> count(1000001);
    for (int i = 0; i < n; i++) {
        count.at(a.at(i))++;
    }
    for (int i = 2; i <= 1000000; i++) {
        if (count.at(i) >= 2) {
            pairwise = false;
        }
    }

    vector<bool> isprime(1001, true);
    isprime.at(0) = false;
    isprime.at(1) = false;
    for (int i = 2; i <= 1000; i++) {
        if (not isprime.at(i)) continue;
        for (int j = i * i; j <= 1000; j += i) {
            isprime.at(j) = false;
        }
    }

    for (int i = 2; i <= 1000; i++) {
        if (not isprime.at(i)) continue;
        int d = 0;
        for (int j = 0; j < n; j++) {
            if (a.at(j) % i == 0) d++;
        }
        if (d >= 2) {
            pairwise = false;
            break;
        }
    }

    if (pairwise) {
        puts("pairwise coprime");
    } else {
        puts("setwise coprime");
    }
}
