#include <bits/stdc++.h>
using namespace std;
// (setq-default c-basic-offset 2)

int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());

  int ret = __gcd(a[0], a[1]);
  bool pair = ret == 1;
  for (int i = 2; i < n; ++i) {
    ret = __gcd(ret, a[i]);
    if (ret != 1) {
      pair = false;
    }
  }
  if (ret == 1) {
    if (pair) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "setwise coprime" << endl;
    }
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
