#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  set<int> a;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a.insert(x);
  }
  int m = *a.rbegin();
  int l = 0;
  while (l * l <= m) l++;
  int mcnt = 0;
  for (int i = 2; i < l; i++) {
    int k = 1;
    int cnt = 0;
    while (i * k <= m) {
      if (a.find(i * k) != a.end()) cnt++;
      k++;
    }
    if (cnt == (int)a.size()) {
      cout << "not coprime" << endl;
      return 0;
    }
    mcnt = max(mcnt, cnt);
  }
  if (mcnt > 1) {
    cout << "setwise coprime" << endl;
    return 0;
  } else {
    cout << "pairwise coprime" << endl;
  }
}
