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