#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int temp;
  while (b != 0) {
    temp = a % b;
    a = b;
    b = temp;
  }
  return a;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  bool pc = true;
  vector<bool> d(1e6 + 1, false);
  int x;
  for (int i = 0; i < N; i++) {
    if (d.at(A.at(i))) {
      pc = false;
      break;
    }
    d.at(A.at(i)) = true;
    for (int j = 2; j <= sqrt(A.at(i)); j++) {
      if (A.at(i) % j == 0) {
        x = A.at(i) / j;
        if (d.at(j) || d.at(x)) {
          pc = false;
          break;
        }
        d.at(j) = true;
        d.at(x) = true;
      }
    }
    if (!pc) {
      break;
    }
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = gcd(A.at(0), A.at(1));
  for (int i = 2; i < N; i++) {
    g = gcd(g, A.at(i));
  }
  if (g != 1) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
