#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int M = 0;
  for (auto &e : A) {
    cin >> e;
    M = max(e, M);
  }
  vector<bool> pr(M + 1, false);
  for (int i = 2; i * i <= M; i++) {
    if (pr[i]) continue;
    for (int j = i; j <= M; j += i) {
      pr[j] = true;
    }
  }
  int co = 0;
  for (int i = 2; i <= M; i++) {
    if (pr[i]) continue;
    int c = 0;
    for (int j = 0; j < N; j++) {
      if (A[j] % i == 0) c += 1;
    }
    co = max(c, co);
  }
  if (co <= 1)
    cout << "pairwise coprime" << endl;
  else if (co == N)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
