#include <bits/stdc++.h>
using namespace std;
const long long inf = 1000000007;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
int prime[1000005], ji = 0;
int pa[1000005], a[1000005], n, p[1000005];
int main() {
  pa[0] = pa[1] = 1;
  for (long long i = 2; i <= 1000000; i++) {
    if (!pa[i]) {
      prime[ji++] = i;
      for (long long j = i * i; j <= 1000000; j = j + i) {
        pa[j] = 1;
      }
    }
  }
  n = read();
  int jj = 0;
  for (int i = 0; i < n; i++) {
    a[jj] = read();
    if (!pa[a[jj]]) {
      p[a[jj]]++;
    } else
      jj++;
  }
  int ma = -1;
  for (int i = 0; i < ji; i++) {
    for (int j = 0; j < jj; j++) {
      if (a[j] % prime[i] == 0) {
        p[prime[i]]++;
      }
    }
    ma = max(p[i], ma);
  }
  if (ma == 1) {
    printf("pairwise coprime\n");
  } else if (ma == n) {
    printf("not coprime\n");
  } else {
    printf("setwise coprime\n");
  }
  return 0;
}
