#include <bits/stdc++.h>
using namespace std;

vector<bool> is_c;
vector<int> p;

void precompute(const int& n) {
// Time Complexity: O(N)
// Space Complexity: O(N)
    is_c.resize(n + 1);
    int g[n + 1];
    g[1] = 1;
    for (int i = 2; i <= n; ++i) {
        if (!is_c[i]) {
            p.push_back(i);
            g[i] = i - 1;
        }
        for (int j = 0; j < p.size() && p[j] * i <= n; ++j) {
            is_c[i * p[j]] = true;
            g[i * p[j]] = g[i] * (i % p[j] ? g[p[j]] : p[j]);
            if (i % p[j] == 0) break;
        }
    }
}


int main() {
    int n;
    cin >> n;
    int a[n];
    int t(1), mx(1);
    unordered_set<int> ps;
    bool paired(true);
    
  //cout << p.size() << endl;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  precompute(mx);
    for (int i = 0; i < n; ++i) {
        if (i) {
            t = gcd(t, a[i]);
        } else {
            t = a[i];
        }
        for (int pp: p) {
            if (pp > a[i]) break;
            if (a[i] % pp) continue;
            if (a[i] % pp == 0) {
                auto x = ps.insert(pp);
              //cout << x.second << endl;
                if (!x.second) paired = false;
                while (a[i] % pp == 0) {
                    a[i] /= pp;
                }
            }
        }
        
    }
    if (t == 1) {
        if (paired) {
            cout << "pairwise coprime\n";
        } else {
            cout << "setwise coprime\n";
        }
    } else {
        cout << "not coprime\n";
    }
    return 0;
};