#include <bits/stdc++.h>
template <typename T>
void write(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  char buf[20], *p = buf;
  do {
    *p++ = '0' + x % 10;
    x /= 10;
  } while (x);
  do {
    putchar(*--p);
  } while (p > buf);
}
template <typename T>
void read(T &x) {
  char c;
  while (c = getchar(), c <= ' ')
    ;
  bool sign = c == '-';
  if (sign) c = getchar();
  x = c - '0';
  while (c = getchar(), c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + (c - '0');
  }
  if (sign) x = -x;
}
const int MAX = 1e6 + 1;
int cnt[MAX];
int ans[MAX];
signed main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  int n;
  read(n);
  int max = 0;
  for (int _ = 0; _ < n; _++) {
    int i;
    read(i);
    ++cnt[i];
    max = std::max(max, i);
  }
  for (int i = 1; i <= max; i++) {
    for (int j = i; j <= max; j += i) {
      ans[i] += cnt[j];
    }
  }
  for (int i = 2; i <= max; i++) {
    if (ans[i] == n) {
      puts("not coprime");
      return 0;
    }
    if (ans[i] > 1) {
      puts("setwise coprime");
      return 0;
    }
  }
  puts("pairwise coprime");
  return 0;
}
