#include<bits/stdc++.h>
#define watch(x) cout << (#x) << " is " << (x) << endl
#define endl "\n"
typedef long long ll;
using namespace std;
int static fast = [](){
  ios::sync_with_stdio(false);
  cin.tie(0); cout.tie(0); return 0;
}();
// freopen("input.txt", "r", stdin);

unordered_map<ll, int> get_primes(ll n) {
    unordered_map<ll, int> facs;
    ll n2 = n;
    for(ll i = 2; i*i <= n; i++) {
        while (n2 % i == 0) {
            facs[i] += 1;
            n2 /= i;
        }
    }
    if (n2 > 1)
        facs[n2] += 1;
    return facs;
}

int main() {
    int n;
    cin >> n;
    vector<int> arr(n, 0);
    for(auto& val: arr)
        cin >> val;
    bool pairwise = true;
    bool setwise = false;
    unordered_set<ll> used;
    for(int i = n-1; i >= 0; i--) {
        auto facs = get_primes(arr[i]);
        for(auto [p, freq]: facs) {
            if (used.count(p) > 0)
                pairwise = false;
            used.insert(p);
        }
    }
    ll glob = arr[0];
    for(int i = 1; i < n; i++)
        glob = gcd(glob, arr[i]);
    if (glob == 1)
        setwise = true;
    if (pairwise)
        cout << "pairwise coprime" << endl;
    else if (setwise)
        cout << "setwise coprime" << endl;
    else
        cout << "not coprime" << endl;
    return 0;
}
