#include <bits/stdc++.h>
using namespace std;
using namespace placeholders;
using LL = long long;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<vector<int> >;
using VS = vector<string>;
using ISS = istringstream;
using OSS = ostringstream;
using PII = pair<int, int>;
using VPII = vector<pair<int, int> >;
template <typename T = int>
using VT = vector<T>;
template <typename T = int>
using VVT = vector<vector<T> >;
template <typename T = int>
using LIM = numeric_limits<T>;
template <typename T = int>
using OSI = ostream_iterator<T>;
template <typename T>
inline istream &operator>>(istream &s, vector<T> &v) {
  for (T &t : v) {
    s >> t;
  }
  return s;
}
template <typename T>
inline ostream &operator<<(ostream &s, const vector<T> &v) {
  for (int i = 0; i < int(v.size()); ++i) {
    s << (" " + !i) << v[i];
  }
  return s;
}
void in_impl(){};
template <typename T, typename... TS>
void in_impl(T &head, TS &...tail) {
  cin >> head;
  in_impl(tail...);
}
template <typename T>
inline T fromString(const string &s) {
  T res;
  istringstream iss(s);
  iss >> res;
  return res;
}
template <typename T>
inline string toString(const T &a) {
  ostringstream oss;
  oss << a;
  return oss.str();
}
template <typename T>
inline bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
vector<long long> primeFactorization(long long N) {
  if (N == 1) {
    return vector<long long>();
  }
  vector<long long> result;
  for (long long p = 2; p * p <= N; p++) {
    while (!(N % p)) {
      result.push_back(p);
      N /= p;
    }
  }
  if (N != 1) {
    result.push_back(N);
  }
  return result;
}
bool pairwise_coprime(VVT<LL> pss) {
  set<LL> factors;
  for (auto &&ps : pss) {
    ps.erase(unique(begin(ps), end(ps)), end(ps));
    for (auto &&p : ps) {
      if (((factors).find(p) != (factors).end())) {
        return false;
      }
      factors.emplace(p);
    }
  }
  return true;
}
bool setwise_coprime(VVT<LL> pss) {
  const auto N = ((int)(pss).size());
  map<LL, int> factors;
  for (auto &&ps : pss) {
    ps.erase(unique(begin(ps), end(ps)), end(ps));
    for (auto &&p : ps) {
      ++factors[p];
    }
  }
  for (auto &&p : factors) {
    if (p.second == N) {
      return false;
    }
  }
  return true;
}
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << setprecision(12) << fixed;
  int N;
  in_impl(N);
  ;
  VI A(N);
  cin >> A;
  VVT<LL> pss;
  for_each(begin(A), end(A),
           [&](const int a) { pss.push_back(primeFactorization(a)); });
  if (pairwise_coprime(pss)) {
    cout << "pairwise coprime" << endl;
  } else if (setwise_coprime(pss)) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
