#include <bits/stdc++.h>
using namespace std;
using ll = long long;
string solve() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  ll AMAX = 1e6 + 1;
  vector<ll> primes(AMAX, -1);
  for (ll i = 2; i < AMAX; i++) {
    if (primes[i] > 0) continue;
    for (ll k = i; k * k < AMAX; k += i) {
      primes[k] = i;
    }
  }
  vector<ll> cnt(AMAX);
  for (int i = 0; i < N; i++) {
    ll a = A[i];
    map<ll, int> m;
    while (a > 1) {
      m[primes[a]]++;
      a /= primes[a];
    }
    for (auto p : m) {
      cnt[p.first]++;
    }
  }
  bool pc = true, sc = true;
  for (int i = 0; i < N; i++) {
    if (cnt[i] > 1) pc = false;
    if (cnt[i] == N) sc = false;
  }
  if (pc)
    return "pairwise coprime";
  else if (sc)
    return "setwise coprime";
  else
    return "not coprime";
}
int main() {
  auto ans = solve();
  cout << ans << "\n";
  return 0;
}
