#include <bits/stdc++.h>
using namespace std;
string answer[3] = {"pairwise coprime", "setwise coprime", "not coprime"};
int v[200200], d[200200 * 5], freq[200200 * 5];
int gcd_val, n, i, x, curr;
int gcd(int X, int Y) {
  if (X < 1) return Y;
  int r = X % Y;
  while (r) {
    X = Y;
    Y = r;
    r = X % Y;
  }
  return Y;
}
void precompute(int nn) {
  d[1] = 1;
  for (int it = 2; it < nn; it += 2) d[it] = 2;
  int P = 2, X;
  for (int it = 3; it < nn; it += 2) {
    if (!d[it]) {
      if (P < nn) {
        P *= it;
      }
      for (X = it; X < nn; X += P) {
        d[X] = it;
      }
    }
  }
}
int main() {
  cin >> n;
  gcd_val = 0;
  for (i = 0; i < n; ++i) {
    cin >> v[i];
    gcd_val = gcd(gcd_val, v[i]);
  }
  if (gcd_val > 1) {
    cout << answer[2];
    return 0;
  }
  precompute(5 * 200200);
  for (i = 0; i < n; ++i) {
    x = v[i];
    while (x > 1) {
      curr = d[x];
      ++freq[curr];
      if (freq[curr] > 1) {
        cout << answer[1];
        return 0;
      }
      while (d[x] == curr) x /= d[x];
    }
  }
  cout << answer[0];
  return 0;
}
