#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const ll llINF = 1LL << 60;
const int iINF = 1e9;
int main() {
  int N;
  cin >> N;
  vector<int> pf(1e6 + 10);
  ll Ai, lf;
  for (int i = 0; i < (N); ++i) {
    cin >> Ai;
    for (ll f = 2; f * f < Ai; ++f) {
      if (Ai % f == 0) {
        pf[f]++;
        pf[Ai / f]++;
      }
      lf = f;
    }
    if (lf * lf == Ai) pf[lf]++;
    if (Ai != 1) pf[Ai] = 1;
  }
  int maxpn = 0;
  for (int pn : pf) chmax(maxpn, pn);
  if (maxpn == 1)
    cout << "pairwise coprime" << endl;
  else if (maxpn == N)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
