#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 gcd(int n, int m) {
  if (n < m) {
    swap(n, m);
  }
  int r = n % m;
  while (r) {
    n = m;
    m = r;
    r = n % m;
  }
  return m;
}
int prime[1000005], ji = 0;
int pa[1000005], a[1000005], n, p[1000005], b[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;
  int ma = -1, flag = 1;
  for (int i = 0; i < n; i++) {
    a[jj] = read();
    b[jj] = a[jj];
    if (!pa[a[jj]]) {
      p[a[jj]]++;
      if (p[a[jj]] > 1) {
        flag = 0;
      }
    } else
      jj++;
  }
  if (flag) {
    for (int i = 0; i < jj; i++) {
      for (int j = 0; j <= ji && prime[j] <= a[i]; j++) {
        if (a[i] % prime[j] == 0) {
          if (p[prime[j]] != 0) {
            flag = 0;
            j = inf;
            i = inf;
            break;
          }
          while (a[i] % prime[j] == 0) {
            p[prime[j]]++;
            a[i] = a[i] / prime[j];
          }
          if (!pa[a[i]]) {
            pa[a[i]]++;
            break;
          }
        }
      }
    }
  }
  if (flag) {
    printf("pairwise coprime\n");
  } else {
    int g = b[0];
    for (int i = 1; i < jj; i++) {
      g = gcd(g, b[i]);
    }
    if (g == 1) {
      printf("setwise coprime\n");
    } else {
      printf("not coprime\n");
    }
  }
  return 0;
}
