#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  bool a = true;
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if (gcd(A.at(i), A.at(j)) != 1) {
        a = false;
      }
    }
  }
  if (a) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  bool b = true;
  int C = 0;
  for (int i = 0; i < N; i++) {
    C = gcd(C, A.at(i));
    if (C == 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "not coprime" << endl;
}
