#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
using Edge = pair<int, ll>;
using Graph = vector<vector<int>>;
using WeightedGraph = vector<vector<Edge>>;
const ll INF64 = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;
const int CASES = 3;
template <typename T>
vector<T> smallest_prime_factors(T n) {
  vector<T> spf(n + 1);
  for (int i = 0; i <= n; i++) spf[i] = i;
  for (T i = 2; i * i <= n; i++) {
    if (spf[i] == i) {
      for (T j = i * i; j <= n; j += i) {
        if (spf[j] == j) {
          spf[j] = i;
        }
      }
    }
  }
  return spf;
}
template <typename T>
vector<T> factolization(T x, vector<T> &spf) {
  vector<T> ret;
  while (x != 1) {
    ret.push_back(spf[x]);
    x /= spf[x];
  }
  sort(ret.begin(), ret.end());
  return ret;
}
void solve() {
  constexpr int MAX = 1000000;
  auto spf = smallest_prime_factors(MAX);
  ll n;
  cin >> n;
  vector<unordered_set<int>> se_vec(n);
  unordered_set<int> total;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    auto res = factolization(a, spf);
    for (int j = 0; j < res.size(); ++j) {
      se_vec[i].insert(res[j]);
      total.insert(res[j]);
    }
  }
  bool flag1 = true;
  bool flag2 = true;
  for (auto it : total) {
    int tmp = 0;
    for (int i = 0; i < n; ++i) {
      if (se_vec[i].count(it) != 0) ++tmp;
    }
    if (tmp != 1) flag1 = false;
    if (tmp == n) flag2 = false;
  }
  string ans = "not coprime";
  if (flag1)
    ans = "pairwise coprime";
  else if (flag2)
    ans = "setwise coprime";
  cout << ans << endl;
}
int main() {
  solve();
  return 0;
}
