#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
string join(const T &v, const string delim = ",") {
  if (v.empty()) return "";
  ostringstream res;
  res << v[0];
  for (int i = 1; i < v.size(); i++) {
    res << delim << v[i];
  }
  return res.str();
}
ll M = 1000000;
vector<ll> spf(M + 1);
void init() {
  for (int i = 0; i <= M; i++) {
    spf[i] = i;
  }
  for (int i = 2; i * i <= M; i++) {
    if (spf[i] != i) continue;
    for (int j = i * i; j <= M; j += i) {
      spf[j] = i;
    }
  }
}
set<ll> pf(ll n) {
  set<ll> res;
  while (n != 1) {
    res.insert(spf[n]);
    n /= spf[n];
  }
  return res;
}
int main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (ll i = (ll)(0); i < (ll)(N); i++) cin >> A[i];
  init();
  vector<ll> c(M + 1);
  for (ll i = (ll)(0); i < (ll)(N); i++) {
    auto s = pf(A[i]);
    for (auto x : s) {
      c[x]++;
    }
  }
  string ans;
  ll max_cnt = *max_element(c.begin(), c.end());
  if (max_cnt == 1) {
    ans = "pairwise coprime";
  } else if (max_cnt == N) {
    ans = "not coprime";
  } else {
    ans = "setwise coprime";
  }
  cout << ans << endl;
}
