#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<set<int>> vec(n, set<int>());
  int a;
  set<int> p;
  bool ispc = true;
  for (int i = 0; i < (int)(n); i++) {
    cin >> a;
    if (p.count(a)) {
      ispc = false;
    } else {
      p.insert(a);
    }
    vec.at(i).insert(a);
    for (int j = sqrt(a); j >= 2; j--) {
      if (a % j == 0) {
        if (p.count(j) || p.count(a / j)) {
          ispc = false;
        } else {
          p.insert(j);
          p.insert(a / j);
        }
        vec.at(i).insert(j);
        vec.at(i).insert(a / j);
      }
    }
  }
  bool issc = true;
  for (int i = 0; i < (int)(n); i++) {
    for (auto t : vec.at(i)) {
      int cnt = 0;
      for (int j = 0; j < (int)(n); j++) {
        if (vec.at(j).count(t)) {
          cnt += 1;
        }
      }
      if (cnt == n) {
        issc = false;
        goto SKIP;
      }
    }
  }
SKIP:;
  if (ispc) {
    cout << "pairwise coprime" << endl;
  } else if (issc) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
