#include <bits/stdc++.h>

using namespace std;

template<class INT>
std::vector<INT> get_min_prime_fact_table(INT n){
    std::vector<INT> lp(n + 1), P;
    for (INT i = 2; i <= n; i++){
        if (lp[i] == 0){
            lp[i] = i;
            P.push_back(i);
        }
        for (INT j = 0; j <= P.size() and P[j] <= lp[i] and i * P[j] <= n; j++)
            lp[i * P[j]] = P[j];
    }

    return lp;
}

template<class INT>
std::vector<INT> prime_factorize(INT n, std::vector<INT>& lp){
    vector<INT> res;
    while (n != 1){
        res.push_back(lp[n]);
        n /= lp[n];
    }

    return res;
}

int main(){
    int n;
    cin >> n;
    vector<int> A(n);
    for (auto &a: A) scanf("%d", a);
    int g = 0;
    for (const auto &a: A)
        g = gcd(g, a);
    
    if (g != 1){
        puts("not coprime");
        return 0;
    }

    auto lp = get_min_prime_fact_table(int(1e6));
    vector<int> DP(1e6 + 1);
    DP[1] = 1;
    for (int i = 2; i <= int(1e6); i++)
        DP[i] = DP[i / lp[i]] * (lp[i] == lp[i / lp[i]] ? 1 : lp[i]);
    
    vector<int> P(1e6 + 1);
    for (const auto &a: A){
        for (const auto &p: prime_factorize(DP[a], lp)){
            if (P[p] == 1){
                puts("setwise coprime");
                return 0;
            }
            P[p]++;
        }
    }

    puts("pairwise coprime");
}
