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