#include <bits/stdc++.h>
static const long long MOD_NUM = 1000000007;
template <class _T>
static void get(_T& a) {
  std::cin >> a;
}
template <class _T>
static void get(_T& a, _T& b) {
  std::cin >> a >> b;
}
template <class _T>
static void get(_T& a, _T& b, _T& c) {
  std::cin >> a >> b >> c;
}
template <class _T>
static _T tp_abs(_T a) {
  if (a < (_T)0) {
    a *= (_T)-1;
  }
  return a;
}
static void E();
int main() {
  E();
  fflush(stdout);
  return 0;
}
template <class _T>
void tp_getPrimes(_T targ, std::map<_T, _T>& primes) {
  _T target = targ;
  _T i = 2;
  while ((i * i) <= target) {
    if ((target % i) == 0) {
      target /= i;
      primes[i]++;
    } else {
      i++;
    }
  }
  if (target > 1) {
    primes[target]++;
  }
}
static void E() {
  int N;
  get(N);
  int maxNum = 0;
  std::vector<int> ai(N);
  for (int i = 0; i < N; i++) {
    get(ai[i]);
    maxNum = std::max(maxNum, ai[i]);
  }
  std::vector<std::map<int, int>> primes(N);
  for (int i = 0; i < N; i++) {
    tp_getPrimes(ai[i], primes[i]);
  }
  bool pairwise = true;
  for (int num = 2; num * num <= maxNum; num++) {
    int gcdCount = 0;
    for (int i = 0; i < N; i++) {
      if (primes[i].find(num) != primes[i].end()) {
        gcdCount++;
      }
    }
    if (gcdCount == N) {
      printf("not coprime\n");
      return;
    }
    if (gcdCount > 1) {
      pairwise = false;
    }
  }
  const char* ans = "pairwise coprime\n";
  if (!pairwise) ans = "setwise coprime\n";
  printf(ans);
}
