#include <bits/stdc++.h>
using namespace std;
int n;
int a[5005];
int ans[5005];
int pre[5005];
int main() {
  while (~scanf("%d", &n)) {
    memset(ans, 0, sizeof(ans));
    memset(pre, 0, sizeof(pre));
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    for (int i = 1; i <= n; i++) {
      for (int j = 2; j * j <= abs(a[i]); j++) {
        if (a[i] % j == 0) {
          while (a[i] % (j * j) == 0) a[i] /= (j * j);
        }
      }
    }
    map<int, int> mp;
    for (int i = 1; i <= n; i++) {
      if (mp.find(a[i]) == mp.end())
        pre[i] = 0;
      else
        pre[i] = mp[a[i]];
      mp[a[i]] = i;
    }
    for (int i = 1; i <= n; i++) {
      int ct = 0;
      int zero = 0, nz = 0;
      for (int j = i; j <= n; j++) {
        if (a[j] == 0) zero = 1;
        if (a[j] != 0) nz = 1;
        if (pre[j] < i) ct++;
        if (nz && zero)
          ans[ct - 1]++;
        else
          ans[ct]++;
      }
    }
    for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
    printf("\n");
  }
  return 0;
}
