#include <bits/stdc++.h>
int main() {
  uint32_t N = 0;
  std::cin >> N;
  std::set<uint32_t> A;
  for (size_t i = 0; i < N; i++) {
    uint32_t a = 0;
    std::cin >> a;
    A.insert(a);
  }
  std::map<uint32_t, uint32_t> prime;
  for (auto a : A) {
    if (a % 2 == 0) prime[2]++;
    while (a % 2 == 0) a /= 2;
    for (size_t p = 3; p * p <= a; p += 2) {
      if (a % p == 0) prime[p]++;
      while (a % p == 0) a /= p;
    }
    if (a != 1) prime[a]++;
  }
  bool pairwise = (A.size() == N);
  for (auto &&p : prime) {
    if (p.second == A.size()) {
      std::cout << "not coprime" << std::endl;
      return 0;
    }
    if (p.second >= 2) pairwise = false;
  }
  std::cout << (pairwise ? "pairwise" : "setwise") << " coprime" << std::endl;
  return 0;
}
