#include <bits/stdc++.h>
using namespace std;
map<int, int> factorize(int n) {
  map<int, int> result;
  for (int i = 2; i * i <= n; i++) {
    if (n % i) {
      continue;
    }
    while (n % i == 0) {
      n /= i;
      result[i]++;
    }
  }
  if (n != 1) {
    result[n]++;
  }
  return result;
}
void Main() {
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  map<int, int> result;
  for (int j = 0; j < N; j++) {
    auto tmp = factorize(A[j]);
    for (auto i : tmp) {
      result[i.first]++;
    }
  }
  bool pairwise = true;
  for (auto r : result) {
    if (r.second == N) {
      cout << "not coprime" << endl;
      return;
    } else if (r.second > 1) {
      pairwise = false;
      break;
    }
  }
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
int main() {
  std::cin.tie(nullptr);
  std::ios_base::sync_with_stdio(false);
  std::cout << std::fixed << std::setprecision(15);
  Main();
  return 0;
}
