#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int flag = 1;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcd(v[i], v[j]) != 1) {
        flag = 0;
        break;
      }
    }
  }
  if (flag == 1) {
    cout << "pairwise coprime";
  }
  int hcf = v[0];
  for (int i = 1; i < n; i++) {
    hcf = gcd(hcf, v[i]);
  }
  if (hcf == 1 && flag == 0) {
    cout << "setwise coprime";
  }
  if (hcf != 1 && flag == 0) {
    cout << "not coprime";
  }
  return 0;
}
