#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 a[1000010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < (n); i++) cin >> a[i];
  bool pc = true;
  for (int i = 0; i < (n - 1); i++) {
    if (GCD(a[i], a[i + 1]) != 1) {
      pc = false;
      break;
    }
  }
  if (pc) {
    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;
  }
}
