#include <bits/stdc++.h>
using namespace std;
int pr[2000000];
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 < (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 < (2000000); i++) {
    if (pr[i] == n) {
      cout << "not coprime";
      return 0;
    } else if (pr[i] > 1) {
      cout << "setwise coprime";
      return 0;
    }
  }
  cout << "pairwise coprime";
}
