#include <bits/stdc++.h>
#pragma GCC optimize("O3,no-stack-protector")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx")
using namespace std;
using Graph = vector<vector<int64_t>>;
const long double pi = M_PI;
const int64_t MOD = 1000000007;
const int64_t INF = 1LL << 62;
int64_t Floor(int64_t a, int64_t b) { return (a - (a % b)) / b; }
template <class T>
inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
inline T Gcd(T a, T b) {
  T c;
  while (b) {
    c = b;
    b = a % b;
    a = c;
  }
  return a;
}
int64_t Lcm(int64_t a, int64_t b) {
  if (a < b) {
    swap(a, b);
  }
  return a / Gcd(a, b) * b;
}
vector<int64_t> prime_factor(int64_t n) {
  vector<int64_t> ret;
  for (int64_t i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
    }
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int64_t n;
  cin >> n;
  vector<int64_t> a(n), l(n + 1);
  for (int64_t i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int64_t i = 0; i < n; i++) {
    l[i + 1] = Gcd(l[i], a[i]);
  }
  set<int64_t> s;
  for (int64_t i = 0; i < n; i++) {
    vector<int64_t> pf = prime_factor(a[i]);
    bool flag = true;
    for (auto e : pf) {
      if (s.find(e) != s.end()) {
        flag = false;
        break;
      } else {
        s.insert(e);
      }
    }
    if (!flag) {
      if (l.back() == 1) {
        cout << "setwise coprime" << endl;
      } else {
        cout << "not coprime" << endl;
      }
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
