#include <bits/stdc++.h>
int pwise(int b);
int a[1000006] = {0};
int gcd(int a, int b);
int main(int argc, char *argv[]) {
  int n, i, j, gd, pair = 1, set = 0;
  scanf("%d", &n);
  int b[n];
  for (i = 0; i < n; i++) {
    scanf("%d", &b[i]);
  }
  gd = b[0];
  for (i = 1; i < n; i++) gd = gcd(gd, b[i]);
  if (gd == 1) set = 1;
  for (i = 0; i < n; i++) {
    pair = pwise(b[i]);
    if (!pair) break;
  }
  if (pair)
    printf("pairwise coprime\n");
  else if (set)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
}
int gcd(int a, int b) {
  int tmp;
  while (a != 0) {
    tmp = a;
    a = b % a;
    b = tmp;
  }
  return b;
}
int pwise(int b) {
  int i, pair = 1, x, y;
  for (i = 2; i * i <= b + b; i++) {
    if (!(b % i)) {
      y = b / i;
      x = i;
      if (y != x) {
        if (a[x] || a[y]) {
          ;
          pair = 0;
          break;
        } else {
          a[x] = 1;
          a[y] = 1;
        }
      } else {
        if (a[x]) {
          pair = 0;
          break;
        } else
          a[x] = 1;
      }
    }
  }
  return pair;
}
