#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;
const ll MOD = 1000000007;
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); }
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 = false;
  for (int i = (0); i < (n); ++i) {
    cin >> v[i];
    sgcd = gcd(sgcd, v[i]);
    for (int j = (0); j < (4); ++j) {
      lcms[j] = lcm(lcms[j], v[i]) % mods[j];
      muls[j] = (muls[j] * v[i]) % mods[j];
    }
  }
  for (int i = (0); i < (4); ++i) {
    cerr << lcms[i] << " " << muls[i] << endl;
    f1 |= lcms[i] == muls[i];
  }
  bool f2 = sgcd == 1;
  if (f1) {
    cout << "pairwise coprime" << endl;
  } else if (f2) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
