#include <bits/stdc++.h>
#define ll long long
#define pb(x) push_back((x))
#define line() cerr << "DEBUG @" << __LINE__ << endl;
#define debug(x) \
    cerr << "DEBUG @" << __LINE__ << " -> " << #x << " = " << x << endl;
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    vector<int> v(n);
    for (int &x : v) cin >> x;
    const int mx = 1e6;
    vector<int> divisors(mx + 1);
    for (int i = 2; i <= 1000000; i++) {
        if (!divisors[i]) {
            for (int j = i; j <= 1000000; j += i) {
                divisors[j] = i;
            }
        }
    }

    map<int, set<int>> m;
    bool pair_wise_coprime = true;
    for (int x : v) {
        int cur = x;
        while (cur != 1) {
            m[divisors[cur]].insert(x);
            if (m[divisors[cur]].size() > 1) pair_wise_coprime = false;
            // debug(cur);
            // debug(divisors[cur]);
            cur /= divisors[cur];
        }
    }
    if (pair_wise_coprime) {
        cout << "pairwise coprime\n";
        return 0;
    }
    int total_gcd = gcd(v[0], v[1]);
    for (int i = 2; i < n; i++) {
        total_gcd = gcd(total_gcd, v[i]);
    }
    if (total_gcd == 1) {
        cout << "setwise coprime\n";
        return 0;
    }
    cout << "not coprime\n";
}
