#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T>
vector<T> eratosthenes(T n) {
  vector<T> ret;
  vector<bool> v;
  v.reserve(n + 1);
  for (T i = 0; i < n + 1; ++i) v.push_back(true);
  ret.push_back(2);
  for (T i = 2; i <= n; i += 2) v[i] = false;
  for (T i = 3; i <= n; ++i) {
    if (v[i]) {
      ret.push_back(i);
      for (T j = i; j <= n; j += i) v[j] = false;
    }
  }
  return ret;
}
int main() {
  vector<ll> pri = eratosthenes<ll>(1e3);
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = 0; i < n; ++i) cin >> a[i];
  sort(a.begin(), a.end());
  if (unique(a.begin(), a.end()) != a.end()) {
    cout << "not coprime" << endl;
    return 0;
  }
  bool flag_p = true;
  bool flag_s = true;
  for (ll x : pri) {
    ll cnt = 0;
    for (ll i = 0; i < n; ++i) {
      if (a[i] % x == 0) ++cnt;
    }
    if (cnt > 1) flag_p = false;
    if (cnt == n) flag_s = false;
  }
  if (flag_p) {
    cout << "pairwise coprime" << endl;
  } else if (flag_s) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
