#include <bits/stdc++.h>
const int MOD = 1e9 + 7, MAX = 1e6;
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); }
typedef struct {
  int SPF[1000001], Primes[168], sz;
} Template;
Template P;
static inline void ready(void) {
  *P.SPF = 1, *P.Primes = 2, P.sz = 1;
  for (int i = 0; i < (int)MAX / 2; i++)
    P.SPF[2 * (i + 1)] = 2, P.SPF[2 * (i + 1) - 1] = 2 * (i + 1) - 1;
  for (int i = 0; i < (int)MAX / 2 - 1; i++) {
    int x = 2 * (i + 1) + 1;
    if (P.SPF[x] == x) {
      P.Primes[P.sz++] = x;
    }
    if (x * x > MAX) break;
    for (int j = 0; j < (int)P.sz; j++) {
      if (P.Primes[j] <= P.SPF[x] && x * P.Primes[j] <= MAX)
        P.SPF[x * P.Primes[j]] = P.Primes[j];
      else
        break;
    }
  }
}
const char common[] = "not coprime", disjoint[] = "pairwise coprime",
           partial[] = "setwise coprime";
int vol = 0, esc[100][2];
static inline int Divise(int x) {
  if (!x) return 0;
  while (x > 1) {
    for (int i = 0; i < (int)vol; i++) {
      if (esc[i][0] == P.SPF[x] && esc[i][1]) return 0;
    }
    esc[vol][0] = P.SPF[x], esc[vol++][1] = 1;
    x /= P.Primes[x];
  }
  return 1;
}
int main(void) {
  int N = IN(), A = 0, g = 0, flag = 0;
  ready();
  for (int i = 0; i < (int)N; i++) {
    A = IN();
    g = GCD(g, A);
    if (!Divise(A)) {
      flag = 1;
    }
  }
  if (g > 1) return puts(common), 0;
  if (flag) return puts(partial), 0;
  return puts(disjoint), 0;
}
