#include <bits/stdc++.h>
using namespace std;
int s[int(1e6 + 1)];
int main() {
  int n;
  scanf("%d", &n);
  int a[n + 1];
  for (register int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (register int i = 1; i <= n; i++) {
    if (a[i] % 2 == 0) s[2]++;
    while (a[i] % 2 == 0) a[i] /= 2;
    int j = 3;
    while (a[i] != 1) {
      if (a[i] % j == 0) s[j]++;
      while (a[i] % j == 0) a[i] /= j;
      j += 2;
    }
  }
  for (register int i = 1; i <= int(1e6); i++) {
    if (s[i] == n) {
      printf("%s\n", "not coprime");
      return 0;
    }
    if (s[i] >= 2) {
      printf("%s\n", "setwise coprime");
      return 0;
    }
  }
  printf("%s\n", "pairwise coprime");
  return 0;
}
