#include <bits/stdc++.h>
using namespace std;

map<long, int> pf(long n) {
  map<long, int> ma;
  for (long i = 2; i * i <= n; i++) {
    while (n % i == 0) ma[i]++, n /= i;
  }
  if (n != 1) ma[n]++;
  return ma;
}

int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A.at(i);

  int G = 0;
  for (int i = 0; i < N; i++) {
    G = gcd(G, A.at(i));
  }
  if (G >= 2) return cout << "not coprime" << "\n", 0;

  vector<int> V(N + 1);
  for (int i = 1; i <= N; i++) {
    for (auto [a, b] : pf(i)) {
      if (V.at(a)) return cout << " setwise coprime" << "\n", 0;
      else V.at(a)++;
    }
  }
  cout << "pairwise coprime" << "\n";
}