#include <bits/stdc++.h>
int64_t gcd(int64_t a, int64_t b) {
  while (1) {
    if (a < b) std::swap(a, b);
    if (!b) break;
    a %= b;
  }
  return a;
}
int main() {
  int64_t N;
  std::cin >> N;
  std::vector<int64_t> A;
  for (int64_t n = 0; n < N; ++n) {
    int64_t a;
    std::cin >> a;
    A.emplace_back(a);
  }
  bool f = false;
  for (int64_t n = 0; n < N - 1; ++n) {
    if (gcd(A[n], A[n + 1]) != 1) {
      f = true;
      break;
    }
  }
  if (!f) {
    std::cout << "pairwise coprime" << std::endl;
    return 0;
  }
  int64_t g = gcd(A[0], A[1]);
  for (int64_t n = 2; n < N; ++n) {
    g = gcd(A[n], g);
  }
  if (g == 1) {
    std::cout << "setwise coprime" << std::endl;
    return 0;
  }
  std::cout << "not coprime" << std::endl;
  return 0;
}
