#include <bits/stdc++.h>
std::vector<int> prime_factors(int n) {
  std::vector<int> a;
  for (int i = 2; i * i <= n; i++)
    for (; n % i == 0; n /= i) a.push_back(i);
  if (n != 1) a.push_back(n);
  a.erase(std::unique(std::begin(a), std::end(a)), std::end(a));
  return std::move(a);
}
int main(int argc, char** argv) {
  std::cin.tie(0);
  std::ios_base::sync_with_stdio(0);
  std::cout << std::fixed << std::setprecision(6);
  std::cerr << std::fixed << std::setprecision(6);
  int N, A[1111111], C = 0;
  std::cin >> N;
  for (int i = 0; i < N; i++) std::cin >> A[i];
  bool is_setwise_coprime = true;
  std::vector<int> primes;
  std::vector<int> a = prime_factors(A[0]);
  int size = a.size();
  std::vector<int> cnt(size, 1);
  for (int i = 0; i < N; i++) {
    for (int j = 0, size2 = primes.size(); j < size2; j++) {
      int& p = primes[j];
      if (j < size)
        if (A[i] % p == 0) cnt[j]++;
      if (A[i] % p == 0) {
        while (A[i] % p == 0) A[i] /= p;
        C++;
      }
    }
    std::vector<int> a = prime_factors(A[i]);
    for (const auto& p : a) primes.push_back(p);
  }
  if (C == 0) {
    std::cout << "pairwise coprime" << std::endl;
  } else {
    for (int i = 0; i < size; i++)
      if (cnt[i] == N) {
        std::cout << "not coprime" << std::endl;
        return 0;
      }
    std::cout << "setwise coprime" << std::endl;
  }
  return 0;
}
