#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a % b) {
    return gcd(b, a % b);
  } else {
    return b;
  }
}
std::vector<int> make_vec(const int N) {
  std::vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<int> P;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  for (int i = 0; i < (int)P.size(); i++) {
    cout << P[i] << endl;
  }
  return P;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  int maxa = -1;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    maxa = max(maxa, a[i]);
  }
  bool f1 = true, f2 = false;
  int gc = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) {
    gc = gcd(gc, a[i]);
  }
  if (gc == 1) {
    f2 = true;
  }
  vector<int> as;
  as = make_vec(sqrt(maxa));
  for (int i = 0; i < (int)as.size(); i++) {
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      if (!(a[j] % as[i])) {
        cnt++;
      }
      if (cnt >= 2) {
        f1 = false;
        goto end;
      }
    }
  }
end:
  string ans;
  if (f1) {
    ans = "pairwise coprime";
  } else if (f2) {
    ans = "setwise coprime";
  } else {
    ans = "not coprime";
  }
  cout << ans << endl;
}
