#include <bits/stdc++.h>
using namespace std;
std::map<int, int> dic;
vector<int> divisor(int64_t n) {
  vector<int> ret;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      dic[i]++;
      if (i * i != n) dic[n / i]++;
    }
  }
  sort(begin(ret), end(ret));
  return (ret);
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    divisor(a[i]);
  }
  bool flg_pair = true;
  bool flg_step = true;
  auto begin = dic.begin(), end = dic.end();
  for (auto iter = begin; iter != end; iter++) {
    int a = iter->second;
    if (a > 1) {
      flg_pair = false;
    }
    if (a == n) {
      flg_step = false;
    }
  }
  if (flg_pair) {
    cout << "pairwise coprime";
  } else if (flg_step) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
  return 0;
}
