#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;
int spf[N];
int fac[N];
bool pairwise, setwise;
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < N; i++) spf[i] = i;
  for (int i = 4; i < N; i += 2) spf[i] = 2;
  for (int i = 3; i * i < N; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < N; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
void getFactorization(int x) {
  vector<int> facs;
  while (x != 1) {
    facs.push_back(spf[x]);
    x = x / spf[x];
  }
  for (auto b : facs)
    if (fac[b] >= 1) pairwise = false;
  for (auto b : facs) fac[b] = 1;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  sieve();
  int n;
  cin >> n;
  vi a(n);
  pairwise = true, setwise = true;
  for (int i = 0; i < n; i++) cin >> a[i];
  int ans = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) ans = gcd(ans, a[i]);
  if (ans != 1) setwise = false;
  for (int i = 0; i < n; i++)
    if (spf[a[i]] != a[i]) getFactorization(a[i]);
  if (pairwise)
    cout << "pairwise coprime";
  else if (setwise)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
