#include <bits/stdc++.h>
template <typename T>
using maximum_heap = std::priority_queue<T, std::vector<T>, std::less<T>>;
template <typename T>
using minimum_heap = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template <typename T>
std::istream &operator>>(std::istream &is, std::vector<T> &v) {
  for (typename std::vector<T>::size_type i = 0; i < v.size(); ++i) {
    is >> v[i];
  }
  return is;
}
namespace IntegerMath {
int64_t floor_div(int64_t x, int64_t y) { return x / y; }
int64_t ceil_div(int64_t x, int64_t y) {
  return (x / y) + std::min(static_cast<int64_t>(1), x % y);
}
int64_t sqrt(int64_t x) {
  return static_cast<int64_t>(::floorl(::sqrtl(static_cast<long double>(x))));
}
int64_t log2(int64_t x) {
  return static_cast<int64_t>(::floorl(::log2l(static_cast<long double>(x))));
}
int64_t log10(int64_t x) {
  return static_cast<int64_t>(::floorl(::log10l(static_cast<long double>(x))));
}
int64_t number_of_digits(int64_t x) {
  return static_cast<int64_t>(
      ::ceill(::log10l(static_cast<long double>(x + 1))));
}
uint64_t gcd(uint64_t a, uint64_t b) {
  uint64_t n = std::min(a, b), m = std::max(a, b);
  return (n == 0) ? m : gcd(m % n, n);
}
uint64_t lcm(uint64_t a, uint64_t b) {
  uint64_t d = gcd(a, b);
  return (a % d == 0) ? (a / d) * b : a * (b / d);
}
};  // namespace IntegerMath
class Prime {
 private:
  std::set<uint64_t> _primes;
  bool _is_prmie(uint64_t n) const {
    uint64_t m = IntegerMath::sqrt(n);
    for (uint64_t d : _primes) {
      if (n % d == 0) {
        return false;
      }
      if (d > m) {
        break;
      }
    }
    return true;
  }

 public:
  Prime(uint64_t n) {
    _primes.insert(2);
    for (uint64_t i = 3; i <= n; i += 2) {
      if (_is_prmie(i)) {
        _primes.insert(i);
      }
    }
  }
  std::set<uint64_t> set() const { return _primes; }
};
using namespace std;
int main() {
  uint64_t N;
  cin >> N;
  vector<uint64_t> A(N);
  cin >> A;
  set<uint64_t> B;
  for (uint64_t n = 0; n < N; ++n) {
    B.insert(A[n]);
  }
  bool has_same_element = B.size() < N;
  bool setwise_flag = true, pairwise_flag = !has_same_element;
  Prime prime(5e+3);
  for (uint64_t p : prime.set()) {
    uint64_t c = 0;
    for (uint64_t n = 0; n < N; ++n) {
      if (A[n] % p == 0) {
        ++c;
      }
      if (c >= 2) {
        pairwise_flag = false;
      }
    }
    if (c == N) {
      setwise_flag = false;
    }
    if (!setwise_flag) {
      break;
    }
  }
  if (pairwise_flag) {
    cout << "pairwise coprime" << endl;
  } else if (setwise_flag) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
