#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
const int MOD = 1000000000 + 7;
template <typename tuple<long long, long long, long long> >
inline string toString(const tuple<long long, long long, long long> &a) {
  ostringstream oss;
  oss << a;
  return oss.str();
};
long long GCD(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
map<int, int> ma;
bool prime_factorize(long long N) {
  for (long long a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    long long ex = 0;
    while (N % a == 0) {
      ++ex;
      N /= a;
    }
    if (ma[a] == 0 && ma[ex] == 0) {
      ma[a] = 1;
      ma[ex] = 1;
    } else {
      return false;
    }
  }
  if (N != 1) {
    if (ma[N] == 0) {
      ma[N] = 1;
    } else {
      return false;
    }
  }
  return true;
}
long long a[1000010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < (n); i++) cin >> a[i];
  bool p = false;
  for (int i = 0; i < (n); i++) {
    if (!prime_factorize(a[i])) {
      p = true;
      break;
    }
  }
  if (!p) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long g = a[0];
  for (int i = 0; i < (n - 1); i++) {
    g = GCD(g, a[i + 1]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
