#include <bits/stdc++.h>
using namespace std;
using ll = long long;
static const int MAX = 1e6;
int d[MAX + 1];
void eratos(int n) {
  for (int i = 0; i <= n; i++) {
    d[i] = i;
  }
  for (int i = 2; i * i <= n; i++) {
    if (d[i] != i) continue;
    for (int j = i + i; j <= n; j += i) {
      if (d[j] != j) continue;
      d[j] = i;
    }
  }
}
int main() {
  int n;
  cin >> n;
  eratos(MAX);
  vector<int> cnt(MAX + 1);
  for (int i = 0; i < n; i++) {
    ll a;
    cin >> a;
    while (a != 1) {
      int pf = d[a];
      cnt[pf]++;
      while (a % pf == 0) a /= pf;
    }
  }
  bool nc = false;
  bool sc = false;
  for (int i = 2; i <= n; i++) {
    if (cnt[i] >= 2) {
      sc = true;
      if (cnt[i] == n) {
        nc = true;
      }
    }
  }
  if (nc) {
    cout << "not coprime\n";
  } else if (sc) {
    cout << "setwise coprime\n";
  } else {
    cout << "pairwise coprime\n";
  }
  return 0;
}
