#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define y_n(ans) cout<<(ans?"Yes":"No")<<endl;

const int MAX = 1e6 + 10;

int main() {
    int n; cin >> n;
    vector<int> a(n);
    vector<bool> exist(MAX, false);
    bool pairwise = true;
    rep(i, n) {
        cin >> a[i];
        if (exist[a[i]]) pairwise = false;
        exist[a[i]] = true;
    }

    vector<bool> is_prime(MAX, true);
    is_prime[0] = false;
    is_prime[1] = false;
    for (int i=2; i<MAX; ++i) {
        if (!is_prime[i]) continue;
        int cnt = 0;
        if (exist[i]) cnt++;
        for (int j=2*i; j<MAX; j+=i) {
            is_prime[j] = false;
            if (exist[j]) cnt++;
        }
        if (cnt > 1) {
            pairwise = false;
            break;
        }
    }

    if (pairwise) {
        cout << "pairwise coprime" << endl;
    }
    else {
        int GCD = a[0];
        for (int i = 1; i < n; ++i) {
            GCD = __gcd(GCD, a[i]);
        }

        if (GCD == 1) {
            cout << "setwise coprime" << endl;
        } else {
            cout << "not coprime" << endl;
        }
    }
}