#include <bits/stdc++.h>
int getgcd(int n, int m) {
  int r;
  int tmp;
  if (n > m) {
    tmp = n;
    n = m;
    m = tmp;
  }
  r = m % n;
  while (r != 0) {
    m = n;
    n = r;
    r = m % n;
  }
  return n;
}
int main() {
  int N;
  scanf("%d", &N);
  int c[N];
  int p = 1, s = 0;
  int i;
  for (i = 0; i < N; i++) {
    scanf("%d", &c[i]);
  }
  int j, r, a, b;
  for (i = 0; i < N - 1; i++) {
    for (j = i + 1; j < N; j++) {
      b = getgcd(c[i], c[j]);
      if (b != 1) {
        p = 0;
        break;
      }
    }
    if (p == 0) break;
  }
  for (i = 2; i < N; i++) {
    a = getgcd(c[0], c[1]);
    a = getgcd(a, c[i]);
    if (a == 1) s = 1;
  }
  if (p == 1)
    printf("pairwise coprime");
  else if (s == 1)
    printf("setwise coprime");
  else
    printf("not coprime");
  return 0;
}
