#include <bits/stdc++.h>
using namespace std;
const int maxn = 5050;
int n, a[maxn], b[maxn], cnt[maxn], ans[maxn];
map<int, int> Map;
int main() {
  scanf("%d", &n);
  int cur = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    int pre = a[i];
    a[i] = abs(a[i]);
    for (int j = 2; j * j <= a[i]; j++) {
      if (!(a[i] % j)) {
        int cnt = 0;
        while (!(a[i] % j)) a[i] /= j, cnt++;
        if (cnt & 1) a[i] *= j;
      }
    }
    if (pre < 0) a[i] *= -1;
    if (Map[a[i]] == 0) Map[a[i]] = ++cur;
    b[i] = Map[a[i]];
  }
  for (int i = 0; i < n; i++) {
    bool flag = true;
    int cur = 0;
    memset(cnt, 0, sizeof(cnt));
    for (int j = i; j < n; j++) {
      flag &= (a[j] == 0);
      if (flag) {
        ans[1]++;
        continue;
      }
      cnt[b[j]]++;
      if (cnt[b[j]] == 1 && a[j] != 0) cur++;
      ans[cur]++;
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
