#include <bits/stdc++.h>
typedef struct fac {
  int n, exp;
} F;
int gcd(int p, int q) {
  while (q) {
    int t = p % q;
    p = q;
    q = t;
  }
  return p;
}
int fact(int n, F* a) {
  int x = n, i, j, c = 0;
  for (i = 2; i * i <= x; i++) {
    for (j = 1; !(x % i); j++) x /= i;
    if (j > 1) {
      a[c].n = i;
      a[c++].exp = j - 1;
    }
  }
  if (x - 1) {
    a[c].n = x;
    a[c++].exp = 1;
  }
  return c;
}
int main() {
  int n, a[1000009], g, ans = 0;
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); i++) {
    scanf("%d", &a[i]);
    if (!i)
      g = a[i];
    else
      g = gcd(a[i], g);
  }
  if (g - 1)
    ans--;
  else {
    int d[1000009] = {};
    for (int i = 0; i < (int)(n); i++) {
      F f[1000009];
      int c = fact(a[i], f);
      for (int j = 0; j < (int)(c); j++) d[f[j].n]++;
    }
    for (int i = 0; i < (int)(1000009); i++)
      if (d[i] > 1) ans++;
  }
  printf(ans ? (ans > 0 ? "setwise coprime" : "pairwise coprime")
             : "not coprime");
}
