#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
using vi = vector<int>;
const int N = 1e6 + 5, MOD = 1e9 + 7, INF = 1e9 + 5;
struct Sieve {
  int n;
  vi spf;
  void init(int x) {
    n = x;
    spf.resize(n);
    iota((spf).begin(), (spf).end(), 0);
    for (int i = 2; i <= n; i++) {
      if (spf[i] != i) continue;
      for (int j = 2 * i; j <= n; j += i) spf[j] = i;
    }
  }
  vi factorisation(int x) {
    vi res;
    while (x != 1) {
      res.push_back(spf[x]);
      x /= spf[x];
    }
    return res;
  }
};
int gcd(int a, int b) { return (a == 0 ? b : gcd(b % a, a)); }
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int g = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) g = gcd(g, a[i]);
  bool pairwise = true, setwise = true;
  if (g != 1) setwise = false;
  Sieve s;
  s.init(N);
  vector<bool> seen(N, false);
  for (auto &(x) : (a)) {
    if (!pairwise) break;
    if (s.spf[x] != x) {
      vi factors = s.factorisation(x);
      for (auto &(fac) : (factors)) {
        if (seen[fac]) {
          pairwise = false;
          break;
        }
      }
      for (auto &(fac) : (factors)) seen[fac] = true;
    }
  }
  if (pairwise)
    cout << "pairwise coprime";
  else if (setwise)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
