#include <bits/stdc++.h>
static inline int IN(void) {
  int x = 0, f = 0, c = getchar();
  while (c < 48 || c > 57) {
    f ^= c == 45, c = getchar();
  }
  while (c > 47 && c < 58) {
    x = x * 10 + c - 48, c = getchar();
  }
  return f ? -x : x;
}
static inline int GCD(int a, int b) { return !b ? a : GCD(b, a % b); }
const char common[] = "not coprime", disjoint[] = "pairwise coprime",
           several[] = "setwise coprime";
int main(void) {
  int N = IN(), A = 0, g = 0, flag = 0, temp = 1;
  for (int i = 0; i < (int)N; i++) {
    A = IN();
    g = GCD(g, A);
    if (g != temp) {
      flag = 1;
    }
    temp = g;
  }
  if (g > 1) return puts(common), 0;
  if (flag) return puts(several), 0;
  return puts(disjoint), 0;
}
