#include <bits/stdc++.h>
using namespace std;
double start_moment = 0;
double get_runtime() { return 1.0 * clock() / CLOCKS_PER_SEC; }
void reset_timer() { start_moment = get_runtime(); }
double timer_time() { return get_runtime() - start_moment; }
void runtime() { cout << fixed << setprecision(5) << get_runtime() << '\n'; }
template <class T>
void read(vector<T> &a, long long n) {
  T x;
  a.clear();
  for (long long i = 0; i < n; i++) {
    cin >> x;
    a.push_back(x);
  }
}
template <class T>
void write(vector<T> &a) {
  for (T x : a) cout << x << ' ';
  cout << '\n';
}
int n;
vector<int> a;
set<int> have;
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  read(a, n);
  bool ok1 = 1;
  bool ok2 = 1;
  int g = a[0];
  for (int i = 1; i < a.size(); i++) g = gcd(g, a[i]);
  if (g != 1) ok2 = 0;
  for (int i = 0; i < n && ok1; i++) {
    for (int j = 2; j * j <= a[i]; j++)
      if (a[i] % j == 0) {
        while (a[i] % j == 0) a[i] /= j;
        if (have.count(j)) ok1 = 0;
        have.insert(j);
      }
    if (a[i] > 1) {
      if (have.count(a[i])) ok1 = 0;
      have.insert(a[i]);
    }
  }
  if (ok1)
    cout << "pairwise coprime";
  else if (ok2)
    cout << "setwise coprime";
  else
    cout << "not comprime";
}
