#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 G, N, A;
  scanf("%d\n", &N);
  int PC[1000001];
  for (int i = 1; i <= 1000000; i++) {
    PC[i] = 0;
  }
  int p = 2, k = 2;
  for (int i = 1; i <= N; i++) {
    scanf("%d", &A);
    if (i == 1)
      G = A;
    else
      G = f(G, A);
    p = 2;
    while (A > 1) {
      if (A % p == 0) {
        PC[p]++;
        while (A % p == 0) A /= p;
      }
      p++;
    }
  }
  int c = 1;
  for (int i = 1; i <= 1000000; i++) {
    if (PC[i] > 1) c = 0;
  }
  if (c == 1)
    printf("pairwise coprime\n");
  else if (G == 1)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
  return 0;
}
