#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, w = 1;
  char ch = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  return x * w;
}
void solve(int &x) {
  int p = 2, w = 1;
  if (x < 0) {
    x = -x;
    w = -1;
  }
  while (p * p <= x) {
    while (x % (p * p) == 0) x /= (p * p);
    ++p;
  }
  x *= w;
}
int n, a[5010];
int ans[5010];
int p[5010], s[5010];
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) {
    a[i] = read();
    solve(a[i]);
    s[i] = a[i];
    a[i] = 1;
  }
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j)
      if (s[j] < s[i]) ++a[i];
  for (int i = 1; i <= n; ++i) {
    memset(p, 0, sizeof(p));
    int cnt = 0;
    for (int j = i; j <= n; ++j) {
      if (!p[a[j]] && s[j] != 0) ++cnt;
      p[a[j]] = 1;
      if (cnt)
        ans[cnt]++;
      else
        ans[1]++;
    }
  }
  for (int i = 1; i < n; ++i) printf("%d ", ans[i]);
  printf("%d\n", ans[n]);
  return 0;
}
