#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) {
  return a < b && (a = b, true);
}
template <typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {
  return a > b && (a = b, true);
}
string app() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
  }
  int MAX = 1e6 + 1;
  vector<int> divisors(MAX);
  for (int i = 0; i < (int)(MAX); i++) divisors[i] = i;
  for (int i = (2); i < (int)(1e3 + 1); i++) {
    int j = 0;
    while ((j += i) < MAX) {
      if (divisors[j] == j) divisors[j] = i;
    }
  }
  set<int> any, all;
  int t = a[0];
  while (t > 1) {
    all.emplace(divisors[t]);
    t /= divisors[t];
  }
  bool anyfailed = false;
  for (int i = 0; i < (int)(n); i++) {
    auto itany = any.begin();
    auto itall = all.begin();
    int t = a[i];
    while (t > 1) {
      int u = divisors[t];
      while (itany != any.end() && *itany < u) itany++;
      if (itany != any.end() && *itany == u) anyfailed = true;
      any.emplace(u);
      while (itall != all.end() && *itall < u) itall = all.erase(itall);
      if (itall != all.end() && *itall == u) itall++;
      t /= divisors[t];
    }
    while (itall != all.end()) itall = all.erase(itall);
  }
  if (anyfailed == false) return "pairwise coprime";
  if (all.empty()) return "setwise coprime";
  return "not coprime";
}
int main() {
  cout << app() << endl;
  return 0;
}
