#include <bits/stdc++.h>
int n, s, t, f, k;
long long a[1000000];
long long e;
int x[1000000];
int p[200];
long long gcd(long long gcd_a, long long gcd_b) {
  if (gcd_a < gcd_b) {
    long long gcd_c;
    gcd_c = gcd_a;
    gcd_a = gcd_b;
    gcd_b = gcd_c;
  }
  if (!gcd_b) return gcd_a;
  return gcd(gcd_b, gcd_a % gcd_b);
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i < 1000; i++) {
    f = 0;
    for (int j = 2; j * j <= i; j++) {
      if (i % j == 0) f++;
    }
    if (f == 0) {
      p[k] = i;
      k++;
    }
  }
  for (int i = 0; i < n; i++) {
    scanf("%lld", a + i);
    s = 0;
    t = a[i];
    while (p[s] * p[s] <= t && s < k) {
      if (t % p[s] == 0) {
        x[p[s]]++;
      }
      s++;
    }
    x[t]++;
  }
  f = 0;
  for (int i = 2; i < 1000000; i++) {
    if (x[i] > 1) f++;
  }
  if (f == 0) {
    printf("pairwise coprime\n");
    return 0;
  }
  e = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) {
    e = gcd(e, a[i]);
  }
  if (e == 1) {
    printf("setwise coprime\n");
  } else {
    printf("not coprime\n");
  }
}
