#include <bits/stdc++.h>
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[200000];
  scanf("%d", &N);
  int G;
  for (int i = 1; i <= N; i++) {
    scanf("%d", A + i);
    if (i == 1)
      G = A[1];
    else
      G = f(G, A[i]);
  }
  int c = 1;
  for (int i = 1; i <= N - 1; i++) {
    for (int j = i + 1; j <= N; 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;
}
