#include <bits/stdc++.h>
using namespace std;
set<long long> getPrimeFactors(long long a) {
  set<long long> s;
  for (long long i = 2; i * i <= a; i++) {
    if (a % i != 0) continue;
    s.insert(i);
    while (a % i == 0) a /= i;
  }
  if (a > 1) s.insert(a);
  return s;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
class ECoprime {
 public:
  void solve(std::istream& cin, std::ostream& cout) {
    long long N;
    cin >> N;
    vector<long long> A(N);
    for (long long i = 0, i_len = (N); i < i_len; ++i) cin >> A[i];
    set<long long> s;
    bool ok = true;
    for (long long i = 0, i_len = (N); i < i_len; ++i) {
      auto t = getPrimeFactors(A[i]);
      for (auto n : t) {
        if (s.count(n)) {
          ok = false;
        }
        s.insert(n);
      }
    }
    if (ok) {
      cout << "pairwise coprime" << endl;
      return;
    }
    long long g = A[0];
    for (long long i = 0, i_len = (N); i < i_len; ++i) {
      g = gcd(g, A[i]);
    }
    cout << (g == 1 ? "setwise coprime" : "not coprime") << endl;
  }
};
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  ECoprime solver;
  solver.solve(in, out);
  return 0;
}
