#include <bits/stdc++.h>
using namespace std;
vector<uint32_t> min_p(1000006);
int main() {
  uint32_t n;
  cin >> n;
  vector<uint32_t> a(n);
  for (uint64_t i = 0; i < n; i++) cin >> a[i];
  min_p[0] = 1;
  for (uint32_t i = 1; i < min_p.size(); i++) {
    min_p[i] = i;
    for (uint32_t j = 2; j * j < i; j++) {
      if (i % j == 0) {
        min_p[i] = j;
        break;
      }
    }
  }
  unordered_map<uint32_t, uint64_t> m;
  for (uint64_t i = 0; i < n; i++) {
    do {
      m[min_p[a[i]]]++;
      a[i] /= min_p[a[i]];
    } while (min_p[a[i]] != min_p[a[i]]);
  }
  bool pc = true;
  bool sc = true;
  for (auto p : m) {
    if (p.second >= n) sc = false;
    if (p.second != 1) pc = false;
  }
  if (pc)
    cout << "pairwise coprime";
  else if (sc)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
