#include <bits/stdc++.h>
using namespace std;
constexpr int64_t MOD = 1e9 + 1;
int32_t GCD(int32_t a, int32_t b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);
  int N;
  cin >> N;
  unordered_set<int> prime_us;
  bool non_pairwise = false;
  auto prime_fact = [&](int x) {
    if (non_pairwise == true) return;
    for (int b = 2; b * b <= x; ++b) {
      if (x % b != 0) continue;
      while (x % b == 0) {
        x /= b;
      }
      if (prime_us.count(b) != 0) {
        non_pairwise = true;
        return;
      }
      prime_us.emplace(b);
    }
  };
  int32_t gcd;
  cin >> gcd;
  prime_fact(gcd);
  for (int i = 1; i < N; i++) {
    int32_t a;
    cin >> a;
    gcd = GCD(gcd, a);
    prime_fact(a);
  }
  if (non_pairwise == false) {
    cout << "pairwise coprime" << endl;
  } else if (gcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
