#include <bits/stdc++.h>
using namespace std;
int main() {
  long n;
  cin >> n;
  vector<long> a(100000, 0);
  for (int i = 0; i < n; i++) {
    long p;
    cin >> p;
    for (int j = 2; j <= p; j++)
      if (p % j == 0) a.at(j - 1)--;
  }
  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;
}
