#include <bits/stdc++.h>

signed main() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(NULL);

    int n;
    std::cin >> n;

    std::vector<int> a(n);
    for (int &i : a) std::cin >> i;

    int gcd = 0;
    for (int i : a) gcd = std::gcd(gcd, i);

    if (gcd != 1) {
        std::cout << "not coprime";
        return 0;
    }

    int mulOf2 = 0;
    for (int i : a) mulOf2 += (i % 2 == 0);

    if (mulOf2 > 1) {
        std::cout << "setwise coprime";
        return 0;
    }

    for (int i = 3; i <= (int) 1e6; i += 2) {
        int mulOfi = 0;
        for (int x : a) mulOfi += (x % i == 0);
        if (mulOfi > 1) {
            std::cout << "setwise coprime";
            return 0;
        }
    }

    std::cout << "pairwise coprime";

    return 0;
}

