#include <bits/stdc++.h>
using namespace std;
int64_t gcd(int a, int b) {
  int64_t g = max(a, b), l = min(a, b), n = l;
  while (g % l != 0) {
    n = g % l;
    g = l;
    l = n;
  }
  return n;
}
int main() {
  bool chec = true;
  map<int64_t, bool> prime;
  prime[2] = false;
  for (int i = 3; i < 1000; i += 2) {
    chec = true;
    for (auto x : prime) {
      if (i % x.first) {
        chec = false;
        break;
      }
    }
    if (chec) prime[i] = false;
  }
  int64_t n;
  cin >> n;
  vector<int64_t> a(n);
  bool pa = true, se = true;
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
    if (pa) {
      for (auto &x : prime) {
        if (a.at(i) % x.first == 0) {
          if (x.second) {
            pa = false;
            break;
          } else {
            x.second = true;
            if (a.at(i) / x.first > 1000) prime[a.at(i) / x.first] = true;
          }
        }
      }
    }
  }
  int64_t k = a.at(0);
  for (int i = 1; i < n; i++) k = gcd(k, a.at(i));
  if (k != 1) se = false;
  cout << (pa ? "pairwise coprime" : (se ? "setwise coprime" : "not coprime"))
       << endl;
  return 0;
}
