#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdint>
#include <iostream>
#include <iterator>
#include <tuple>
#include <vector>

// lib/quo.hpp
#ifndef QUO_H
#define QUO_H

/*
a == tools::quo(a, b) * b + tools::mod(a, b)
0 <= tools::mod(a, b) < std::abs(b)
*/

namespace tools {
  template <typename T>
  constexpr T quo(const T& lhs, const T& rhs) {
    return lhs > static_cast<T>(0)
      ? lhs / rhs
      : rhs > static_cast<T>(0)
        ? -((-lhs - 1 + rhs) / rhs)
        : (-lhs - 1 + -rhs) / -rhs;
  }
}

#endif

// lib/util.hpp
#ifndef UTIL_HPP
#define UTIL_HPP


using i64 = ::std::int_fast64_t;
using u64 = ::std::uint_fast64_t;
using i32 = ::std::int_fast32_t;
using u32 = ::std::uint_fast32_t;

namespace tools {
  template <typename T>
  void read(::std::istream& is, ::std::vector<T>& vector, const typename ::std::vector<T>::size_type size) {
    vector.reserve(size);
    ::std::copy_n(::std::istream_iterator<T>(is), size, ::std::back_inserter(vector));
  }
  template <typename T>
  void read(::std::vector<T>& vector, const typename ::std::vector<T>::size_type size) {
    ::tools::read(::std::cin, vector, size);
  }

  template <typename T, ::std::size_t N>
  void read(::std::istream& is, ::std::array<T, N>& array) {
    ::std::copy_n(std::istream_iterator<T>(is), N, array.begin());
  }
  template <typename T, ::std::size_t N>
  void read(::std::array<T, N>& array) {
    ::tools::read(::std::cin, array);
  }
}

#endif

// lib/extgcd.hpp
#ifndef EXTGCD_HPP
#define EXTGCD_HPP


/*
usage:

const auto result = tools::extgcd(a, b);

// 0を単位元として追加したGCD
int gcd = result.gcd;

// a * x + b * y = gcd を満たす、無数にある(x, y)の組のうちの一つ
int x0 = result.x0;
int y0 = result.y0;
*/

namespace tools {
  namespace detail {
    namespace extgcd {
      template <typename T>
      class result {
      public:
        T gcd;
        T x0;
        T y0;
        result() = default;
        result(const T& gcd, const T& x0, const T& y0) :
          gcd(gcd), x0(x0), y0(y0) {
        }
      };
    }
  }
  template <typename T>
  ::tools::detail::extgcd::result<T> extgcd(T prev_r, T r) {
    T prev_s = 1;
    T prev_t = 0;
    T s = 0;
    T t = 1;
    while (r != 0) {
      const T q = ::tools::quo(prev_r, r);
      const T next_r = prev_r - q * r;
      prev_r = r;
      r = next_r;
      const T next_s = prev_s - q * s;
      prev_s = s;
      s = next_s;
      const T next_t = prev_t - q * t;
      prev_t = t;
      t = next_t;
    }
    return ::tools::detail::extgcd::result<T>(std::abs(prev_r), prev_s, prev_t);
  }
}

#endif

// lib/gcd.hpp
#ifndef GCD_HPP
#define GCD_HPP


/*
usage:

tools::gcd(4, 5);
*/

namespace tools {
  template <typename T>
  T gcd(const T& a, const T& b) {
    return ::tools::extgcd(a, b).gcd;
  }
}

#endif

// main.cpp

int main() {
  i64 N;
  std::cin >> N;
  std::vector<i64> A;
  tools::read(A, N);

  const bool is_pairwise_coprime = [&]() {
    const i64 max_A_i = *std::max_element(A.begin(), A.end());

    std::vector<std::vector<i64>> prime_factors(max_A_i + 1);
    for (i64 i = 2; i <= max_A_i; ++i) {
      if (prime_factors[i].empty()) {
        for (i64 j = i; j <= max_A_i; j += i) {
          prime_factors[j].push_back(i);
        }
      }
    }

    std::unordered_set<i64> used_primes;
    for (const i64& A_i : A) {
      for (const i64& prime_factor : prime_factors[A_i]) {
        if (!used_primes.insert(prime_factor).second) {
          return false;
        }
      }
    }

    return true;
  }();

  const bool is_setwise_coprime = std::accumulate(A.begin(), A.end(), static_cast<i64>(0), [](const i64& gcd, const i64& A_i) { return tools::gcd(gcd, A_i); }) == 1;

  std::cout << (is_pairwise_coprime ? "pairwise coprime" : is_setwise_coprime ? "setwise coprime" : "not coprime") << std::endl;
  return 0;
}

Measured memory_bytes: 81088