#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
int n, p[N], mx;
bool pd1, pd2;
inline void re(int &x) {
  x = 0;
  bool flag = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') flag |= (ch == '-'), ch = getchar();
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  x = flag ? -x : x;
}
void divd(int a) {
  int i, sqrta = (int)sqrt(a);
  if (mx < sqrta) mx = sqrta;
  for (i = 2; i <= sqrta; i++) {
    if (a % i == 0) p[i]++;
    while (a % i == 0) a /= i;
    if (a == 0) break;
  }
  if (a) p[a]++;
}
int main() {
  int i, a;
  re(n);
  for (i = 1; i <= n; i++) {
    re(a);
    divd(a);
  }
  for (i = 1; i <= mx; i++) {
    if (p[i] >= n) {
      pd1 = 1;
      break;
    }
    if (p[i] > 1) pd2 = 1;
  }
  if (pd1) {
    printf("not coprime");
  } else {
    if (pd2) {
      printf("setwise coprime");
    } else {
      printf("pairwise coprime");
    }
  }
  return 0;
}
