#include <bits/stdc++.h>
using namespace std;
int pr[5001];
map<int, int> prime_factor(int m) {
  map<int, int> rtn;
  for (int i = 2; i * i <= m; i++) {
    while (!(m % i)) {
      ++rtn[i];
      m /= i;
    }
  }
  if (m != 1) rtn[m] = 1;
  return rtn;
}
int main() {
  int n;
  cin >> n;
  for (int(i) = 0; i < (5000); i++) pr[i] = 0;
  for (int(i) = 0; i < (n); i++) {
    int tmp;
    cin >> tmp;
    map<int, int> mp = prime_factor(tmp);
    for (auto p : mp) {
      pr[p.first]++;
    }
  }
  for (int(i) = 0; i < (5000); i++)
    if (pr[i] == n) {
      cout << "not coprime" << endl;
      return 0;
    }
  for (int(i) = 0; i < (5000); i++) {
    if (pr[i] > 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
