#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<bool>> prime_sieve(T lim) {
  vector<T> primes = vector<T>();
  vector<bool> composite = vector<bool>(lim + 1);
  for (T num = 2; num <= lim; num++) {
    if (!composite[num]) primes.push_back(num);
    for (int i = 0; i < (int)(primes.size()) and num * primes[i] <= lim; i++) {
      composite[num * primes[i]] = true;
      if (num % primes[i] == 0) break;
    }
  }
  return {primes, composite};
}
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);
  }
  int prob_lim = (int)min(1e3 + 100, ceil(sqrt(maxx)) + 100);
  auto [primes, composite] = prime_sieve(prob_lim);
  vector<int> prime_freq = vector<int>(prob_lim);
  for (const int& a : A) {
    int b = a;
    for (int i = 0; primes[i] * primes[i] <= b; i++) {
      if (b % primes[i] == 0) prime_freq[primes[i]]++;
      while (b % primes[i] == 0) b /= primes[i];
    }
    if (b != 1) prime_freq[b]++;
  }
  int max_freq = 0;
  for (int i = 0; i < (int)(prime_freq.size()); i++) {
    max_freq = max(max_freq, prime_freq[i]);
  }
  if (max_freq <= 1) {
    cout << "pairwise coprime";
  } else {
    cout << (max_freq < n ? "setwise coprime" : "not coprime");
  }
}
