#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long c, long long d) { return c / gcd(c, d) * d; }
template <typename Monoid>
struct SegmentTree {
  using F = function<Monoid(Monoid, Monoid)>;
  long long sz;
  vector<Monoid> seg;
  const F f;
  const Monoid M1;
  SegmentTree(long long n, const F f, const Monoid &M1) : f(f), M1(M1) {
    sz = 1;
    while (sz < n) sz <<= 1;
    seg.assign(2 * sz, M1);
  }
  void set(long long k, const Monoid &x) { seg[k + sz] = x; }
  void build() {
    for (long long k = sz - 1; k > 0; k--) {
      seg[k] = f(seg[2 * k + 0], seg[2 * k + 1]);
    }
  }
  void update(long long k, const Monoid &x) {
    k += sz;
    seg[k] = x;
    while (k >>= 1) {
      seg[k] = f(seg[2 * k + 0], seg[2 * k + 1]);
    }
  }
  Monoid query(long long a, long long b) {
    Monoid L = M1, R = M1;
    for (a += sz, b += sz; a < b; a >>= 1, b >>= 1) {
      if (a & 1) L = f(L, seg[a++]);
      if (b & 1) R = f(seg[--b], R);
    }
    return f(L, R);
  }
  Monoid operator[](const long long &k) const { return seg[k + sz]; }
};
void solve() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (auto &x : A) {
    cin >> x;
  }
  sort((A).begin(), (A).end());
  if (A[0] == 1) {
    cout << "pairwise coprime\n";
    return;
  }
  SegmentTree<long long> seg(
      N, [](long long a, long long b) { return gcd(a, b); }, A[0]);
  for (long long i = (0), i_len = (N); i < i_len; ++i) {
    seg.set(i, A[i]);
  }
  seg.build();
  if (seg.query(0, N) != 1) {
    cout << "not coprime\n";
    return;
  }
  for (long long i = (0), i_len = (N); i < i_len; ++i) {
    for (long long j = (0), j_len = (i); j < j_len; ++j) {
      long long t = seg.query(j, i + 1);
      if (t != 1) {
        cout << "setwise coprime\n";
        return;
      }
    }
  }
  cout << "pairwise coprime\n";
}
signed main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  solve();
}
