#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned ll
#define PI acos(-1)
#define vi vector<int>
#define pi pair<int, int>
#define pl pair<ll, ll>
template<typename T> using v2 = vector<vector<T>>;
template<typename T> using v3 = vector<vector<vector<T>>>;
template<class T> istream &operator>>(istream&is,vector<T>&v){for(auto &elemnt:v)is>>elemnt;return is;}
template<class T,class U> istream &operator>>(istream&is,pair<T,U>&p){is>>p.first>>p.second;return is;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const int MOD = 1e9 + 7;
const int INF = 1e9 + 200;
const ll INFLL = 2e18 + 200;

int table[1000 * 1000 + 100];

void gen_table() {
    for (int i = 2; i <= 1000 * 1000; i++) {
        if (table[i] != 0) continue;
        for (int j = i + i; j <= 1000 + 1000; j += i) table[j] = i;
    }
}

set<int> prime_factor(int tmp) {
    set<int> ret;
    while (true) {
        if (table[tmp] == 0) {
            ret.insert(tmp);
            break;
        }
        ret.insert(table[tmp]);
        tmp /= table[tmp];
    }
    return ret;
}

int main() {
    int N;
    cin >> N;
    vector<int> A(N);
    cin >> A;
    sort(A.begin(), A.end());
    gen_table();
    map<int, int> check;
    for (auto tmp : A) {
        if (tmp == 1) continue;
        set<int> prime = prime_factor(tmp);
        for (auto num : prime) check[num]++;
    }
    bool pairwise = true;
    for (auto tmp : A) {
        if (tmp == 1) continue;
        set<int> prime = prime_factor(tmp);
        for (auto num : prime) {
            if (check[num] > 1) pairwise = false;
            check[num]--;
        }
    }
    int tmp = A[0];
    for (int i = 1; i < N; i++) tmp = gcd(tmp, A[i]);
    bool setwise = (tmp == 1);
    if (pairwise) {
        cout << "pairwise coprime" << endl;
    } else if (setwise) {
        cout << "setwise coprime" << endl;
    } else {
        cout << "not coprime" << endl;
    }
} 