#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll gcd(ll a, ll b) {
  if (a % b == 0) return b;
  ll k = a % b;
  return gcd(b, k);
}
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  set<ll> st;
  bool can = true;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    if (st.count(a[i])) {
      can = false;
    }
    st.insert(a[i]);
  }
  vector<ll> prime(1000006, 1);
  prime[0] = 0;
  prime[1] = 0;
  for (int i = 2; i < 1000006; i++) {
    if (!can) break;
    if (prime[i]) {
      set<ll> nst;
      if (st.count(i)) {
        nst.insert(i);
      }
      for (int j = 2 * i; j < 1000006; j += i) {
        prime[j] = 0;
        if (st.count(j)) {
          nst.insert(j);
          if (nst.size() > 1) {
            can = false;
            break;
          }
        }
      }
    }
    if (!can) break;
  }
  if (can) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ll pp = a[0];
  ll j = 0;
  for (int i = 1; i < n; i++) {
    j = gcd(pp, a[i]);
    pp = j;
  }
  if (pp == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
