#include <bits/stdc++.h>
using namespace std;
int main() {
  long int N;
  cin >> N;
  long int A[N];
  for (long int i = 0; i < N; i++) cin >> A[i];
  sort(A, A + N);
  vector<long int> v, w(1005, 1);
  for (long int i = 2; i < 1005; i++) {
    if (w[i] == 1) {
      v.push_back(i);
      int n = i;
      while (n < 1005) {
        w[n] = 0;
        n += i;
      }
    }
  }
  long int sz = v.size();
  bool a = true, b = true;
  for (long int i = 0; i < sz; i++) {
    int m = 0;
    for (long int j = 0; j < N; j++) {
      if (A[j] % v[i] == 0) m++;
    }
    if (m >= 2) a = false;
    if (m == N) b = false;
  }
  if (A[0] == A[N - 1]) {
    if (A[0] >= 2) {
      a = false;
      b = false;
    }
  }
  if (a) {
    for (long int i = 0; i < N - 1; i++) {
      if (A[i] == A[i + 1]) a = false;
    }
  }
  if (a)
    cout << "pairwise coprime" << endl;
  else if (b)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
