#include <bits/stdc++.h>
using namespace std;
long long dx[4] = {1, 0, -1, 0};
long long dy[4] = {0, 1, 0, -1};
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;
}
template <typename Cont, typename Func>
Cont fmap(const Cont &container, Func functor) {
  Cont result(container.size());
  std::transform(container.begin(), container.end(), result.begin(), functor);
  return result;
}
template <typename Cont, typename Pred>
Cont filter(const Cont &container, Pred predicate) {
  Cont result;
  std::copy_if(container.begin(), container.end(), std::back_inserter(result),
               predicate);
  return result;
}
template <typename T, typename... Args>
void ci(T &first, Args &...args) {
  ((cin >> first), ..., (cin >> args));
}
template <char Sep, typename T, typename... Args>
void print_seq(const T &first, const Args &...args) {
  ((cout << first), ..., (cout << Sep << args));
}
void co() { cout << endl; }
template <typename... Words>
void co(Words... words) {
  print_seq<' '>(words...);
  cout << endl;
}
int solve() {
  long long n;
  ci(n);
  vector<long long> a;
  for (long long i = 0, i_len = (n); i < i_len; i++) {
    long long buf;
    ci(buf);
    a.push_back(buf);
  }
  42;
  42;
  bool prime_maker[1005];
  for (long long i = 0, i_len = (1005); i < i_len; i++) prime_maker[i] = true;
  prime_maker[0] = false;
  prime_maker[1] = false;
  for (long long i = 2, i_len = (1005); i < i_len; i++) {
    for (long long j = 2, j_len = (1005 / i); j < j_len; j++) {
      if (i * j > 1005) continue;
      prime_maker[i * j] = false;
    }
  }
  vector<long long> primes;
  for (long long i = 0, i_len = (1005); i < i_len; i++) {
    if (prime_maker[i]) primes.push_back(i);
  }
  42;
  unordered_set<long long> seki;
  bool setwise = false;
  vector<bool> flags;
  for (long long i = 0, i_len = (primes.size()); i < i_len; i++)
    flags.push_back(true);
  42;
  for (long long i = 0, i_len = (n); i < i_len; i++) {
    for (long long j = 0, j_len = (primes.size()); j < j_len; j++) {
      if (a[i] < primes[j]) {
        for (long long k = j, k_len = (primes.size()); k < k_len; k++)
          flags[k] = false;
        break;
      }
      if (fmod(a[i], primes[j]) == 0) {
        if (seki.count(j)) {
          setwise = true;
        } else {
          seki.insert(j);
        }
      } else {
        flags[j] = false;
      }
    }
  }
  for (long long i = 0, i_len = (primes.size()); i < i_len; i++) {
    if (flags[i] == true) {
      42;
      co("not coprime");
      return 0;
    }
  }
  if (setwise) {
    co("setwise coprime");
  } else {
    co("pairwise coprime");
  }
  return 0;
}
int main() {
  solve();
  return 0;
}
