#include <bits/stdc++.h>
using namespace std;
long long int a[5005];
long long int par[5005];
long long int ans[5005];
int main() {
  long long int n;
  scanf("%lld", &n);
  for (long long int i = 1; i <= n; i++) scanf("%lld", a + i);
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = 1; j < i; j++) {
      long long int ok = a[i] * a[j];
      if (ok <= 0) continue;
      long long int val = sqrt(a[i] * a[j]);
      if (val * val == a[i] * a[j]) par[i] = j;
    }
  }
  ans[1] = n;
  for (long long int i = 1; i <= n; i++) {
    long long int pre = (a[i] != 0);
    for (long long int j = i + 1; j <= n; j++) {
      if (par[j] < i && a[j] != 0) pre++;
      if (pre == 0)
        ans[1]++;
      else
        ans[pre]++;
    }
  }
  for (long long int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
