#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  cin >> N;
  int Amax = 0;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    Amax = max(Amax, A[i]);
  }
  vector<bool> V(Amax + 1, true);
  vector<int> P;
  for (int i = 2; i <= Amax; i++) {
    if (V[i]) {
      P.push_back(i);
      for (int j = 2; i * j <= Amax; j++) {
        V[i * j] = false;
      }
    }
  }
  int M = P.size();
  vector<int> F(M, 0);
  bool paircop = true, setcop = true;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < M; j++) {
      if (A[i] % P[j] == 0) {
        if (F[j] > 0) {
          paircop = false;
        }
        F[j]++;
      }
    }
  }
  for (int j = 0; j < M; j++) {
    if (F[j] >= N) {
      setcop = false;
    }
  }
  if (paircop) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (setcop) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
