#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int NINF = -1 * INF;
const long long LLINF = 1ll << 60;
const long long LLNINF = -1 * LLINF;
template <class Ch, class Tr, class Container>
basic_ostream<Ch, Tr>& operator<<(basic_ostream<Ch, Tr>& os,
                                  Container const& x) {
  os << "{ ";
  for (auto& y : x) os << y << " ";
  return os << "}";
}
template <class X, class Y>
ostream& operator<<(ostream& os, pair<X, Y> const& p) {
  return os << "[ " << p.first << ", " << p.second << "]";
}
const long long MOD = 1e9 + 7;
template <typename T>
struct Sieve_Struct {
  const T lim;
  vector<T> primes;
  vector<bool> composite;
  Sieve_Struct(T limit) : lim(limit) {
    primes = vector<T>();
    composite = vector<bool>(lim + 1, false);
    for (T num = 2; num <= lim; num++) {
      if (!composite[num]) primes.push_back(num);
      for (int i = 0; i < (int)(primes.size()) and num * primes[i] <= lim;
           i++) {
        composite[num * primes[i]] = true;
        if (num % primes[i] == 0) break;
      }
    }
  }
  bool is_composite(T x) {
    assert(x <= lim);
    return composite[x];
  }
  template <typename U>
  pair<vector<U>, vector<bool>> sieve_range(U L, U R) {
    U sqrtn = ceil(sqrt(R));
    assert(sqrtn <= lim);
    vector<U> primes_range = vector<U>();
    vector<bool> composite_range = vector<bool>(R - L + 1, false);
    if (L == 1) composite_range[0] = true;
    for (const U& p : primes) {
      for (U mult = max((U)2, (U)L / p - 10); (long long)mult * p <= R;
           mult++) {
        long long cand = mult * p;
        if (cand >= L) composite_range[cand - L] = true;
      }
    }
    for (int i = 0; i < (int)(composite_range.size()); i++) {
      if (!composite_range[i]) primes_range.push_back(L + i);
    }
    return {primes_range, composite_range};
  }
  unordered_map<T, int> prime_factorization(T x) {
    assert(ceil(sqrt(x)) <= lim);
    unordered_map<T, int> push_front = unordered_map<T, int>();
    for (const T& p : primes) {
      while (x % p == 0) {
        push_front[p]++;
        x /= p;
      }
    }
    if (x > 1) push_front[x]++;
    return push_front;
  }
  vector<T> prime_factors(T x) {
    assert(ceil(sqrt(x)) <= lim);
    vector<T> factors = vector<T>();
    for (const T& p : primes) {
      if (x % p == 0) factors.push_back(p);
      while (x % p == 0) x /= p;
    }
    if (x > 1) factors.push_back(x);
    return factors;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> A = vector<int>();
  int max_a = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    A.push_back(x);
    max_a = max(max_a, x);
  }
  Sieve_Struct<int> s = Sieve_Struct<int>(1e7);
  unordered_map<int, int> prime_freqs = unordered_map<int, int>();
  for (const int& a : A) {
    for (const int& f : s.prime_factors(a)) {
      prime_freqs[f]++;
    }
  }
  int max_freq = 0;
  for (const auto& [factor, freq] : prime_freqs) {
    max_freq = max(max_freq, freq);
  }
  if (max_freq <= 1) {
    cout << "pairwise coprime";
  } else {
    cout << (max_freq < n ? "setwise coprime" : "not coprime");
  }
}
