#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<long long>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vvb = vector<vb>;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
std::vector<long long> sieve(long long n) {
  std::vector<long long> res(n);
  std::iota(res.begin(), res.end(), 0);
  for (long long i = 2; i * i < n; ++i) {
    if (res[i] < i) continue;
    for (long long j = i * i; j < n; j += i)
      if (res[j] == j) res[j] = i;
  }
  return res;
}
std::set<long long> factor(long long n,
                           const std::vector<long long> &min_factor) {
  std::set<long long> res;
  while (n > 1) {
    res.insert(min_factor[n]);
    n /= min_factor[n];
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long n;
  cin >> n;
  vll a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  const vll min_factor = sieve(1000010);
  vll d(1000010);
  for (long long i = 0; i < (long long)(n); i++) {
    set<long long> t = factor(a[i], min_factor);
    auto itr = t.begin();
    while (itr != t.end()) {
      d[*itr]++;
      ++itr;
    }
  }
  long long minf = d[0];
  long long maxf = d[0];
  for (long long i = 0; i < (long long)(1000000); i++) {
    maxf = max(maxf, d[i]);
  }
  if (maxf == 1) {
    cout << "pairwise coprime" << endl;
  } else if (maxf != n) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
