#include <bits/stdc++.h>
int main(void) {
  long n, a;
  scanf("%ld", &n);
  long number[1001], size = 0;
  for (long i = 2; i <= 1000; i++) {
    number[i] = 1;
  }
  for (long i = 2; i <= 1000; i++) {
    if (number[i] == 1) {
      size++;
      for (long j = 2; i * j <= 1000; j++) {
        number[i * j] = 0;
      }
    }
  }
  long prime[size], cur = -1;
  for (long i = 2; i <= 1000; i++) {
    if (number[i] == 1) {
      cur++;
      prime[cur] = i;
    }
  }
  long **tree;
  tree = (long **)malloc(sizeof(long *) * (n + 1));
  for (long i = 0; i < n + 1; i++) {
    tree[i] = (long *)malloc(sizeof(long) * size);
    for (long j = 0; j < size; j++) {
      tree[i][j] = 0;
    }
  }
  for (long i = 1; i <= n; i++) {
    scanf("%ld", &a);
    for (long j = 0; j < size; j++) {
      while (a % prime[j] == 0) {
        tree[0][j]++;
        tree[i][j]++;
        a /= prime[j];
      }
    }
  }
  int flag = 1, zero;
  for (long i = 1; i <= n; i++) {
    for (long j = 0; j < size; j++) {
      if (tree[i][j] != 0 && tree[i][j] != tree[0][j]) {
        flag = 0;
        break;
      }
    }
    if (flag == 0) {
      break;
    }
  }
  if (flag == 1) {
    printf("pairwise coprime\n");
    return 0;
  }
  flag = 1;
  for (long i = 0; i < size; i++) {
    zero = 0;
    for (long j = 1; j <= n; j++) {
      if (tree[j][i] == 0) {
        zero = 1;
        break;
      }
    }
    if (zero == 0) {
      flag = 0;
      break;
    }
  }
  if (flag == 1) {
    printf("setwise coprime\n");
    return 0;
  }
  printf("not coprime\n");
  return 0;
}
