#include <bits/stdc++.h>
using namespace std;
int hurui(int x) {
  bool Q = true;
  for (int i = 2; i < 1000; i++) {
    if (x % i == 0) {
      return i;
      break;
    }
  }
  if (Q) {
    return x;
  }
}
int main() {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  vector<int> saiyaku(N);
  for (int i = 0; i < N; i++) {
    saiyaku[i] = hurui(A[i]);
  }
  std::sort(saiyaku.begin(), saiyaku.end());
  int Q = 0;
  for (int i = 1; i < N; i++) {
    if (saiyaku[i - 1] == saiyaku[i]) {
      Q++;
    }
  }
  if (Q == 0) {
    cout << "pairwise coprime" << endl;
  }
  if (Q == N - 1) {
    cout << "not coprime" << endl;
  }
  if (Q > 0 && Q < N - 1) {
    cout << "setwise coprime" << endl;
  }
}
