#include <bits/stdc++.h>
using namespace std;
int calc_gcd(int v1, int v2) {
  if (v1 < v2) swap(v1, v2);
  if (v2 == 0) {
    return v1;
  } else {
    return calc_gcd(v2, v1 % v2);
  }
}
int main(void) {
  int N;
  cin >> N;
  vector<int> Array(N);
  for (int i = 0; i < N; i++) {
    cin >> Array[i];
  }
  int gcd_1 = 0;
  int gcds = Array[0];
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if (calc_gcd(Array[i], Array[j]) == 1) {
        gcd_1++;
      }
    }
    gcds = calc_gcd(gcds, Array[i + 1]);
  }
  long long int pair_tot = N * (N - 1) / 2;
  if (gcd_1 == pair_tot) {
    cout << "pairwise coprime" << endl;
  } else if (gcds > 1) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
