#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int gcd(int a, int b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> as(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> as[i];
  }
  bool pc = true;
  int g = gcd(as[0], as[1]);
  int c = g;
  if (g != 1) {
    pc = false;
  }
  for (int i = 2; i < as.size(); i++) {
    int gg = gcd(as[i - 1], as[i]);
    if (gg != g) {
      pc = false;
      if (gg != 1) {
        c = gg;
      }
    }
  }
  bool sc = true;
  int cnt = 0;
  for (int i = 0; i < (int)(n); i++) {
    if (as[i] % c == 0) {
      cnt++;
    }
  }
  if (cnt == as.size()) {
    sc = false;
  }
  if (sc) {
    cout << "setwise coprime" << endl;
    return 0;
  } else if (pc) {
    cout << "pairwise coprime" << endl;
    return 0;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
