#include <bits/stdc++.h>
template <typename T>
T GCD(T a, T b) {
  return a ? GCD(b % a, a) : b;
}
template <typename T>
T LCM(T a, T b) {
  return (a * b) / GCD(a, b);
}
template <typename T>
std::ostream &operator<<(std::ostream &os, const std::vector<T> &v) {
  for (auto ob : v) os << ob << " ";
  return os;
}
template <typename T, typename S>
std::ostream &operator<<(std::ostream &os, const std::map<T, S> &v) {
  for (auto ob : v) os << ob.first << " : " << ob.second << std::endl;
  return os;
}
using ld = double;
using ll = long long int;
using ul = unsigned long long int;
using namespace std;
class ECoprime {
  vector<bool> chk;
  bool flag;
  void Factor(int x) {
    if (chk[x]) {
      flag = true;
      return;
    }
    chk[x] = true;
    for (int i = 2; i * i < x + 1; ++i) {
      if (x % i == 0) {
        if (chk[i]) {
          flag = true;
          return;
        }
        if (chk[x / i]) {
          flag = true;
          return;
        }
        chk[i] = true;
        chk[x / i] = true;
      }
    }
  }

 public:
  void solve(std::istream &in, std::ostream &out) {
    int n;
    in >> n;
    vector<int> a(n);
    chk.resize(1000003);
    for (int i = 0; i < n; ++i) {
      in >> a[i];
    }
    flag = false;
    for (int i = 0; i < n; ++i) {
      Factor(a[i]);
      if (flag) break;
    }
    if (!flag) {
      out << "pairwise coprime" << endl;
      return;
    }
    int g = a[0];
    for (int i = 1; i < n; ++i) {
      g = GCD(g, a[i]);
    }
    if (g == 1) {
      out << "setwise coprime" << endl;
    } else {
      out << "not coprime" << endl;
    }
  }
};
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  ECoprime solver;
  std::istream &in(std::cin);
  std::ostream &out(std::cout);
  solver.solve(in, out);
  return 0;
}
