#include <bits/stdc++.h>
int gcd(int x, int y);
int main(void) {
  int N, a[1000001] = {0}, sum = 0, i, j, t = 0, min = 1000001;
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%d", &a[i]);
    if (a[i] < min) min = a[i];
  }
  for (i = 0; i < N - 1; i++) {
    for (j = i + 1; j < N; j++) {
      t = gcd(a[i], a[j]);
      if (t) break;
    }
    if (t) break;
  }
  if (t == 0) {
    printf("pairwise coprime");
    return 0;
  }
  t = 0;
  for (i = 2; i <= min; i++) {
    for (j = 0; j < N; j++) {
      if (a[j] % i != 0) break;
      if (j == N - 1) {
        t = 1;
        break;
      }
    }
    if (t) {
      printf("not coprime");
      return 0;
    }
  }
  printf("setwise coprime");
  return 0;
}
int gcd(int x, int y) {
  int a = 0, i = 0;
  if (x > y)
    a = y;
  else
    a = x;
  for (i = 2; i <= a; i++) {
    if (x % i == 0 && y % i == 0) return 1;
  }
  return 0;
}
