#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int NINF = -1 * INF;
const long long LLINF = 1ll << 60;
const long long LLNINF = -1 * LLINF;
template <class Ch, class Tr, class Container>
basic_ostream<Ch, Tr>& operator<<(basic_ostream<Ch, Tr>& os,
                                  Container const& x) {
  os << "{ ";
  for (auto& y : x) os << y << " ";
  return os << "}";
}
template <class X, class Y>
ostream& operator<<(ostream& os, pair<X, Y> const& p) {
  return os << "[ " << p.first << ", " << p.second << "]";
}
const long long MOD = 1e9 + 7;
template <typename T>
pair<vector<T>, vector<T>> prime_sieve(T lim) {
  vector<T> primes = vector<T>();
  vector<T> lp = vector<T>(lim + 1, 0);
  for (int num = 2; num <= lim; num++) {
    if (lp[num] == 0) {
      lp[num] = num;
      primes.push_back(num);
    }
    for (int i = 0; i < (int)(primes.size()) and primes[i] <= lp[num] and
                    num * primes[i] <= lim;
         i++) {
      lp[num * primes[i]] = primes[i];
    }
  }
  return {primes, lp};
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> A = vector<int>();
  int maxx = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    A.push_back(x);
    maxx = max(maxx, x);
  }
  auto [primes, lp] = prime_sieve(maxx);
  unordered_map<int, int> prime_freq = unordered_map<int, int>();
  for (const int& a : A) {
    int b = a;
    while (b > 1) {
      prime_freq[lp[b]]++;
      b /= lp[b];
    }
  }
  int max_freq = 0;
  for (const auto& [p, freq] : prime_freq) {
    max_freq = max(max_freq, freq);
  }
  if (max_freq <= 1) {
    cout << "pairwise coprime";
  } else {
    cout << (max_freq < n ? "setwise coprime" : "not coprime");
  }
}
