#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
long long modInv(long long a, long long modVal) {
  long long b = modVal, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    std::swap(a, b);
    u -= t * v;
    std::swap(u, v);
  }
  u %= modVal;
  if (u < 0) u += modVal;
  return u;
}
template <typename T>
T gcd(T a, T b) {
  if (a < b) {
    std::swap(a, b);
  }
  return b ? gcd(b, a % b) : a;
}
template <typename T>
T lcm(T a, T b) {
  return a * b / gcd(a, b);
}
template <typename T>
T lcmModInv(T a, T b, const T mod) {
  return (((a * b) % mod) * modInv(gcd(a, b), mod)) % mod;
}
bool isPairwiseCoprime(const std::vector<long long> &a, const long long mod) {
  const auto len = a.size();
  long long prod = a[0];
  long long lcms = a[0];
  for (int i = 1; i < len; i++) {
    prod = (prod * a[i]) % mod;
    lcms = lcmModInv(lcms, a[i], mod) % mod;
    if (prod != lcms) {
      return false;
    }
  }
  return true;
}
bool isSetwiseCoprime(const std::vector<long long> &a) {
  const auto len = a.size();
  long long all = a[0];
  for (size_t i = 1; i < len; i++) {
    all = gcd<long long>(all, a[i]);
  }
  return all == 1;
}
int main(int argc, char *argv[]) {
  long long n;
  std::vector<long long> a;
  std::cin >> n;
  a.resize(n);
  for (int i = 0; i < n; i++) {
    std::cin >> a[i];
  }
  if (isPairwiseCoprime(a, 1000000007) && isPairwiseCoprime(a, 1000000009)) {
    std::cout << "pairwise coprime" << std::endl;
  } else {
    if (isSetwiseCoprime(a)) {
      std::cout << "setwise coprime" << std::endl;
    } else {
      std::cout << "not coprime" << std::endl;
    }
  }
  return 0;
}
