#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 a[1000005], n;
int main() {
  n = read();
  srand(time(0));
  for (int i = 0; i < n; i++) {
    a[i] = read();
  }
  long long l = a[0], g = a[0];
  for (int i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g != 1) {
    printf("not coprime\n");
  } else {
    int t = 10000000;
    while (t--) {
      int u = rand() % n, v = rand() % n;
      if (u == v) {
        continue;
      } else {
        int p = gcd(a[u], a[v]);
        if (p != 1) {
          printf("setwise coprime\n");
          return 0;
        }
      }
    }
    printf("pairwise coprime\n");
  }
  return 0;
}
