#include <bits/stdc++.h>

using namespace std;

class SieveOfEratosthenes {
 private:
  std::vector<int> sieve;

 public:
  SieveOfEratosthenes(int n) : sieve(n + 1) {
    std::iota(sieve.begin(), sieve.end(), 0);
    for (int i = 2; i * i < n + 1; i++) {
      if (sieve[i] != i) continue;
      for (int j = i * i; j < n + 1; j += i) {
        if (sieve[j] == j) sieve[j] = i;
      }
    }
  }

  bool is_prime(int x) const { return x != 0 && x != 1 && sieve[x] == x; }

  std::vector<int> factor(int x) const {
    std::vector<int> res;
    while (x > 1) {
      res.emplace_back(sieve[x]);
      x /= sieve[x];
    }
    return res;
  }

  set<int> sfactor(int x) const {
    set<int> res;
    while (x > 1) {
      res.insert(sieve[x]);
      x /= sieve[x];
    }
    return res;
  }
};

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  cin >> N;
  int ma = 0;
  vector<int> A(N);
  for (auto&& e : A) {
    cin >> e;
    ma = max(ma, e);
  }
  SieveOfEratosthenes soe(ma);
  bool pairwise = true;
  vector<bool> table(ma + 1, false);
  for (auto&& e : A) {
    auto primes = soe.sfactor(e);
    for (auto&& p : primes) {
      if (table[p]) {
        pairwise = false;
      }
      for (int k = 1; p * k < ma + 1; k++) {
        table[k * p] = true;
      }
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << '\n';
    return 0;
  }
  int g = A[0];
  for (auto&& e : A) {
    g = gcd(g, e);
  }
  if (g == 1) {
    cout << "setwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
  return 0;
}
