#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int mi = 1000001;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > 1) mi = min(mi, a[i]);
  }
  bool ok = true;
  while (ok) {
    ok = false;
    int tmp = mi;
    for (int i = 0; i < n; i++) {
      if (a[i] == mi) continue;
      if (a[i] == 1) continue;
      ok = true;
      a[i] -= mi;
      if (a[i] > 1) tmp = min(tmp, a[i]);
    }
    mi = tmp;
  }
  int ans = 2;
  sort(a.begin(), a.end());
  for (int i = 0; i < n; i++) {
    if (a[i] == 1) {
      ans = 0;
    }
    if (i > 0 && a[i] > 1 && ans == 0 && a[i] == a[i - 1]) ans = 1;
  }
  if (ans == 0)
    cout << "pairwise coprime";
  else if (ans == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  cout << endl;
  return 0;
}
