#include <bits/stdc++.h>
int gcd(int m, int n) {
  int rem, temp;
  if (m < n) {
    temp = m;
    m = n;
    n = temp;
  }
  while (n > 0) {
    rem = m % n;
    m = n;
    n = rem;
  }
  return m;
}
int prime(int n) {
  int i;
  for (i = 2; i < n; i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
int main() {
  int n, a[20000], g[1000], i, j, k = 0, flag = 1, res;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      g[k++] = gcd(a[i], a[j]);
    }
  }
  for (i = 0; i < n; i++) {
    if (g[i] != 1) {
      flag = 0;
      res = prime(g[i]);
      if (res == 0) break;
    }
  }
  if (flag == 1)
    printf("pairwise coprime");
  else if (flag == 0 && res != 0)
    printf("setwise coprime");
  else
    printf("not coprime");
}
