#include <bits/stdc++.h>
using namespace std;
bool gozyohou(int a, int b) {
  while (a > 1) {
    b = b % a;
    if (b == 0) return false;
    swap(a, b);
  }
  return true;
}
bool gozyohou(vector<int> x) {
  if (x.size() <= 1) {
    return true;
  }
  sort(x.begin(), x.end());
  while (x[0] > 1) {
    for (int i = 1; i < (int)x.size(); i++) {
      x.at(i) %= x.at(0);
    }
    x.erase(remove_if(x.begin(), x.end(), [](int v) { return v == 0; }),
            x.end());
    sort(x.begin(), x.end());
    if ((int)x.size() == 1) {
      return false;
    }
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  bool pair = true;
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
    if (i > 0) {
      if (!gozyohou(a.at(i - 1), a.at(i))) {
        pair = false;
      }
    }
  }
  if (pair) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (gozyohou(a)) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
