#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<bool> b(1e6 + 1, false);
  map<int, int> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    m[a[i]]++;
  }
  bool pairwise = true, setwise = true;
  for (int i = 2; i <= 1e3; i++) {
    if (b[i]) continue;
    int cnt = 0;
    for (int j = 2 * i; j <= 1e6; j += i) {
      b[j] = true;
      if (m[j]) cnt += m[j];
    }
    if (cnt > 1) pairwise = false;
  }
  if (!pairwise && !setwise) {
    cout << "not coprime" << endl;
  } else if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
