#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct PrimeNumbers {
  int max;
  vector<bool> is_prime;
  vector<int> primes;
  PrimeNumbers(int max) : max(max) {
    is_prime = vector<bool>(max + 1, true);
    is_prime.at(0) = is_prime.at(1) = false;
    for (int i = 2; i * i <= max; ++i)
      if (is_prime.at(i))
        for (int j = i * i; j <= max; j += i) is_prime.at(j) = false;
    for (int i = 2; i <= max; ++i)
      if (is_prime.at(i)) primes.emplace_back(i);
  }
  template <typename T>
  vector<T> prime_factorization(T n) {
    vector<T> factors;
    try {
      if (n < 2 || n / (max + 1) >= (max + 1))
        throw "The argument of prime_factorization() is out of range.";
    } catch (char const* str) {
      cout << str << endl;
    }
    for (int p : primes) {
      if (n == 1) return factors;
      while (n % p == 0) {
        factors.emplace_back(p);
        n /= p;
      }
    }
    if (n != 1) factors.emplace_back(n);
    return factors;
  }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  int a_max = 0;
  for (int i = 0; i < (n); ++i) {
    cin >> a.at(i);
    a_max = max(a_max, a.at(i));
  }
  PrimeNumbers pn(a_max);
  bool paircop = true, setcop = true;
  int n_factor;
  set<int> p_large;
  for (int i : a) {
    if (i > (int)sqrt(a_max) + 1 && pn.is_prime.at(i)) {
      p_large.emplace(i);
    }
  }
  for (int p : pn.primes) {
    if (p > (int)sqrt(a_max) + 1) break;
    n_factor = 0;
    for (int i = 0; i < (n); ++i) {
      if (a.at(i) % p == 0) n_factor++;
    }
    if (n_factor > 1) paircop = false;
    if (n_factor == n) setcop = false;
    if (!setcop) {
      printf("not coprime\n");
      return 0;
    }
  }
  for (int p : p_large) {
    n_factor = 0;
    for (int i = 0; i < (n); ++i) {
      if (a.at(i) % p == 0) n_factor++;
    }
    if (n_factor > 1) paircop = false;
    if (n_factor == n) setcop = false;
    if (!setcop) {
      printf("not coprime\n");
      return 0;
    }
  }
  if (paircop)
    printf("pairwise coprime\n");
  else
    printf("setwise coprime\n");
  return 0;
}
