#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>

int main() {
  constexpr int kMax = 1000000;
  int N;
  std::cin >> N;
  std::vector<int> A(N);
  int gcd = 0;
  for (int i = 0; i < N; ++i) {
    std::cin >> A[i];
    gcd = std::gcd(gcd, A[i]);
  }
  if (gcd != 1) {
    std::cout << "not coprime" << std::endl;
    return 0;
  }
  std::vector<bool> is_prime(kMax + 1, true);
  std::vector<int> primes;
  for (int p = 2; p <= kMax; ++p) {
    if (is_prime[p]) {
      primes.push_back(p);
      for (int j = p * 2; j <= kMax; j += p) {
        is_prime[j] = false;
      }
    }
  }
  std::vector<bool> seen(primes.size());
  bool duplicated = false;
  for (int i = 0; i < N; ++i) {
    auto a = A[i];
    for (const auto p : primes) {
      if (p > a) break;
      if (a % p == 0) {
        if (seen[p]) {
          duplicated = true;
          break;
        }
        seen[p] = true;
        do {
          a /= p;
        } while (a % p == 0);
      }
    }
    if (duplicated) break;
  }
  if (duplicated) {
    std::cout << "setwise coprime" << std::endl;
  } else {
    std::cout << "pairwise coprime" << std::endl;
  }
  return 0;
}
