#include <bits/stdc++.h>
int st(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int f(int a, int b) {
  int r;
  while (b > 0) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
int main() {
  int N;
  int A[2000000];
  scanf("%d", &N);
  int G;
  for (int i = 0; i < N; i++) {
    scanf("%d", A + i);
    if (i == 0)
      G = A[0];
    else
      G = f(G, A[i]);
  }
  int c = 1;
  qsort(A, N, sizeof(int), st);
  for (int i = 1; i < N; i++) {
    if (A[i] == A[i - 1]) {
      c = 0;
    } else if (A[i] - A[i - 1] > 1) {
      for (int j = i - 1; j >= 0; j--) {
        if (f(A[i], A[j]) != 1) {
          c = 0;
          break;
        }
      }
    }
    if (c == 0) break;
  }
  if (c == 1)
    printf("pairwise coprime\n");
  else if (G == 1)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
  return 0;
}
