#include <bits/stdc++.h>
using namespace std;
random_device rnd;
mt19937 mt(rnd());
using ll = long long;
using lld = long double;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<ll>;
using VVL = vector<VL>;
using PII = pair<int, int>;
const int IINF = 1 << 30;
const ll INF = 1ll << 60;
ll gcd(ll a, ll b) {
  if (a < b) {
    swap(a, b);
  }
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
ll pow(ll base, ll num, ll mod) {
  if (num == 0) return 1;
  ll prev = pow(base, num / 2, mod);
  if (num % 2 == 0) {
    return (prev * prev) % mod;
  } else {
    return (((prev * prev) % mod) * base) % mod;
  }
}
int main() {
  int n;
  cin >> n;
  vector<ll> mods = {(ll)1000000000 + 7ll, (ll)1000000000 + 9ll,
                     (ll)1000000000 + 21ll, (ll)1000000000 + 33ll};
  vector<ll> lcms(4, 1);
  vector<ll> muls(4, 1);
  VL v(n);
  ll sgcd = v[0];
  bool f1 = true;
  ll curmul = 1;
  for (int i = (0); i < (n); ++i) {
    cin >> v[i];
    sgcd = gcd(sgcd, v[i]);
    for (int j = (0); j < (4); ++j) {
      lcms[j] =
          (((muls[j] * v[i]) % mods[j]) * pow(sgcd, mods[j] - 2, mods[j])) %
          mods[j];
      muls[j] = (muls[j] * v[i]) % mods[j];
    }
    if (i != 0)
      for (int j = (0); j < (4); ++j) {
        f1 &= lcms[j] == muls[j];
      }
  }
  bool f2 = sgcd == 1;
  if (f1) {
    cout << "pairwise coprime" << endl;
  } else if (f2) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
