#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_prime[1111];
  memset(is_prime, 1, sizeof(is_prime));
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i * i <= N; i++)
    if (is_prime[i])
      for (int k = i + i; k <= N; k += i) is_prime[k] = false;
  std::vector<int> primes;
  for (int i = 0; i <= 1000; i++)
    if (is_prime[i]) primes.push_back(i);
  int cp = 0;
  for (const auto& p : primes) {
    int c = 0;
    for (int i = 0; i < N; i++)
      if (A[i] % p == 0) {
        c++;
        for (; A[i] % p == 0; A[i] /= p)
          ;
      }
    if (c) cp = std::max(c, cp);
  }
  std::map<int, int> map;
  for (int i = 0; i < N; i++)
    if (A[i] > 1000) map[A[i]]++;
  for (const auto& kv : map)
    if (kv.second) cp = std::max(kv.second, cp);
  if (cp == 1) {
    std::cout << "pairwise coprime" << std::endl;
  } else if (cp < N) {
    std::cout << "setwise coprime" << std::endl;
  } else {
    std::cout << "not coprime" << std::endl;
  }
  return 0;
}
