#include <bits/stdc++.h>
using namespace std;
int64_t N;
vector<int64_t> A;
int64_t gcd(int64_t a, int64_t b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int lcm(int64_t a, int64_t b) { return a * b / gcd(a, b); }
int main() {
  std::cout << std::fixed << std::setprecision(20);
  cin >> N;
  A = vector<int64_t>(N, 0);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  bool ret = false;
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      int a = gcd(A[i], A[j]);
      if (a != 1) {
        ret = true;
        break;
      }
    }
    if (ret) break;
  }
  if (!ret) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int x = gcd(A[0], A[1]);
  for (int i = 2; i < N; i++) {
    x = gcd(x, A[i]);
    if (x != 1) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
  return 0;
}
