#include <bits/stdc++.h>
using namespace std;
const int M = 5010 + 7;
int a[M], vs[M];
long long ans[M];
int li[M];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    for (int j = 2; j * j <= abs(a[i]); j++)
      while (abs(a[i]) % (j * j) == 0) a[i] /= j * j;
    li[i] = a[i];
  }
  int sz = n;
  sort(li + 1, li + 1 + sz);
  sz = unique(li + 1, li + 1 + sz) - (li + 1);
  for (int i = 1; i <= n; i++) {
    a[i] = lower_bound(li + 1, li + 1 + sz, a[i]) - li;
  }
  for (int i = 1; i <= n; i++) {
    memset(vs, 0, sizeof(vs));
    int nm = 0, ze = 0;
    for (int j = i; j <= n; j++) {
      if (!vs[a[j]]) vs[a[j]] = 1, nm++;
      if (li[a[j]] == 0) ze = 1;
      ans[max(nm - ze, 1)]++;
    }
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
