#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0;
  int f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -f;
  for (; isdigit(c); c = getchar()) x = x * 10 + (c - '0');
  return x * f;
}
inline void out(int x) {
  if (x >= 10) out(x / 10);
  putchar(x % 10 + '0');
}
int n, a[1010101], cnt[1010101];
bool pr(int x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return 0;
  return 1;
}
int main() {
  cin >> n;
  for (int i = (0); i < (n); i++) cin >> a[i];
  bool ok = 0;
  for (int i = (2); i < (1000); i++)
    if (pr(i)) {
      for (int j = (0); j < (1000001); j++) cnt[i] = 0;
      int g = 0, k = 0;
      for (int j = (0); j < (n); j++)
        if (a[j] % i == 0) {
          g++;
          cnt[a[j] / i]++;
          k = max(k, cnt[a[j] / i]);
        }
      g = max(g, k);
      if (g == n) {
        cout << "not coprime\n";
        return 0;
      }
      if (g > 1) ok = 1;
    }
  if (ok && n != 2)
    cout << "setwise coprime\n";
  else
    cout << "pairwise coprime\n";
  return 0;
}
