#include <bits/stdc++.h>
using namespace std;
inline char nchar() {
  static const int bufl = 1 << 20;
  static char buf[bufl], *a = NULL, *b = NULL;
  return a == b && (b = (a = buf) + fread(buf, 1, bufl, stdin), a == b) ? EOF
                                                                        : *a++;
}
inline int read() {
  int x = 0, f = 1;
  char c = nchar();
  for (; !isdigit(c); c = nchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = nchar()) x = x * 10 + c - '0';
  return x * f;
}
const int maxn = 5e3 + 10;
int n, a[maxn], ans[maxn];
int c[maxn], d[maxn], all;
int deal(int x) {
  if (!x) return 0;
  int f = x >= 0 ? 1 : -1;
  x = abs(x);
  int ed = sqrt(x), res = 1;
  for (int i = 2; i <= ed; ++i)
    if (x % i == 0) {
      int cnt = 0;
      do x /= i, cnt ^= 1;
      while (x % i == 0);
      if (cnt) res *= i;
    }
  if (x > 1) res *= x;
  return res * f;
}
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) d[i] = a[i] = deal(read());
  sort(d + 1, d + n + 1), all = unique(d + 1, d + n + 1) - d - 1;
  for (int i = 1; i <= n; ++i) a[i] = lower_bound(d + 1, d + all + 1, a[i]) - d;
  for (int i = 1; i <= n; ++i) {
    memset(c, 0, sizeof c);
    bool zero = true;
    int tmp = 0;
    for (int j = i; j <= n; ++j) {
      int k = a[j];
      if (d[k]) {
        if (!c[k]++) ++tmp;
        zero = false;
      }
      ++ans[zero ? 1 : tmp];
    }
  }
  for (int i = 1; i <= n; ++i) printf("%d%c", ans[i], " \n"[i == n]);
  return 0;
}
