#include <bits/stdc++.h>
using namespace std;
int main() {
  long n;
  int d = 0;
  cin >> n;
  vector<long> a(100000, 0);
  for (int i = 0; i < n; i++) {
    long p;
    cin >> p;
    for (int j = 0; j < p; j++)
      if (p % (j + 2) == 0) a.at(j)--;
  }
  sort(a.begin(), a.end());
  if (a.at(0) >= -1)
    cout << "pairwise coprime" << endl;
  else if (a.at(0) == (-1) * n)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
