#include <bits/stdc++.h>
using namespace std;
long long n, i = 1, a[5005], sgn[5005], x, y, cnt = 0, ans[5005] = {0},
             mark[5005];
map<long long, long long> m;
int main(void) {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  for (cin >> n; i <= n; i++) {
    cin >> a[i];
    if (a[i] < 0) {
      sgn[i] = -1;
    } else
      sgn[i] = 1;
    a[i] = abs(a[i]);
  }
  for (i = 1; i <= n; i++) {
    x = 1;
    if (a[i] == 0) continue;
    vector<long long> v;
    for (long long j = 2; j * j <= a[i]; j++) {
      cnt = 0;
      if (a[i] % j == 0) {
        while (a[i] % (j * j) == 0) a[i] /= (j * j);
      }
    }
    a[i] *= sgn[i];
    mark[i] = m[a[i]];
    m[a[i]] = i;
  }
  for (i = 1; i <= n; i++) {
    cnt = 0;
    for (long long j = i; j <= n; j++) {
      if (mark[j] < i && a[j] != 0)
        cnt++;
      else if (i == j && a[i] == 0) {
        while (a[j] == 0 && j < n) j++, ans[1]++;
        if (j <= n) cnt = 1;
      }
      if (j <= n) ans[cnt]++;
    }
  }
  for (i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
