#include <bits/stdc++.h>
using namespace std;
int sosu(int n) {
  if (n == 2)
    return 1;
  else if (n % 2 == 0)
    return 0;
  double a = sqrt(n);
  for (int i = 3; i <= a; i += 2) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  int cmax = 0, tmp = 0;
  int i = 2;
  while (i <= a[n - 1]) {
    tmp = 0;
    if (sosu(i)) {
      for (int j = 0; j < n; j++) {
        if (a[j] % i == 0) {
          tmp++;
        }
      }
      cmax = max(cmax, tmp);
    }
    if (i == 2) {
      i++;
    } else {
      i += 2;
    }
  }
  if (cmax < 2) {
    cout << "pairwise coprime" << endl;
  } else if (cmax < n) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
