#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int inf = 1001001001;
constexpr ll INF = 3003003003003003003;
template <typename T>
inline bool chmin(T& x, const T& y) {
  if (x > y) {
    x = y;
    return 1;
  }
  return 0;
}
template <typename T>
inline bool chmax(T& x, const T& y) {
  if (x < y) {
    x = y;
    return 1;
  }
  return 0;
}
struct IOSET {
  IOSET() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(10);
  }
} ioset;
ll GCD(ll x, ll y) {
  if (!y) return x;
  return GCD(y, x % y);
}
const int MAX = 1000010;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); ++i) cin >> a[i];
  vector<int> p(MAX + 1, 1);
  p[0] = p[1] = 0;
  for (int i = (int)(2); i < (int)(MAX + 1); ++i) {
    if (not p[i]) continue;
    for (int j = i * 2; j <= MAX; j += i) p[j] = 0;
  }
  bool pairwise = true, setwise = true;
  for (int i = (int)(2); i < (int)(MAX + 1); ++i) {
    if (not p[i]) continue;
    int cnt = 0;
    for (int j = 0; j < (int)(n); ++j) {
      if (a[j] % i == 0) ++cnt;
    }
    if (cnt >= 2) pairwise = false;
    if (cnt == n) setwise = false;
  }
  if (pairwise) {
    cout << "pairwise coprime\n";
    return 0;
  }
  if (setwise) {
    cout << "setwise coprime\n";
    return 0;
  }
  cout << "not coprime\n";
  return 0;
}
