#include <bits/stdc++.h>
using namespace std;
using P = pair<long long, long long>;
int main(void) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  map<int, int> prime;
  for (int i = 0; i < (n); ++i) {
    int target = a[i];
    for (int j = 2; j <= target; j == 2 ? ++j : j += 2) {
      bool isDivide = false;
      while (target % j == 0) {
        target /= j;
        isDivide = true;
      }
      if (isDivide) ++prime[j];
    }
  }
  bool isPairwise = true;
  bool isSetwise = true;
  for (auto p : prime) {
    if (1 < p.second) isPairwise = false;
    if (n <= p.second) isSetwise = false;
  }
  string ans = isPairwise  ? "pairwise coprime"
               : isSetwise ? "setwise coprime"
                           : "not coprime";
  cout << ans << endl;
}
