#include <bits/stdc++.h>
using namespace std;
vector<int64_t> Eratosthenes(const int64_t N) {
  vector<bool> is_prime(N + 1);
  for (int64_t i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  vector<int64_t> P;
  for (int64_t i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int64_t j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
int main() {
  int64_t N;
  string ans;
  ans = "pairwise coprime";
  cin >> N;
  vector<int64_t> A(N);
  for (int64_t i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  vector<int64_t> cnt(1000000, 0);
  vector<int64_t> prime_num = Eratosthenes(1000000);
  for (const auto &x : Eratosthenes(N)) {
    for (int64_t i = 0; i < N; i++) {
      if (A.at(i) % x == 0) {
        cnt.at(x)++;
      }
    }
  }
  for (int64_t j = 0; j < 1000000; j++) {
    if (cnt.at(j) > 1) {
      ans = "setwise coprime";
    }
  }
  for (int64_t j = 0; j < 1000000; j++) {
    if (cnt.at(j) == N) {
      ans = "not coprime";
    }
  }
  cout << ans << endl;
  return 0;
}
