#include <bits/stdc++.h>
using namespace std;
const int N = 5005;
int n, a[N], ans[N], prv[N];
vector<int> bad[N];
int sign(int v) {
  if (v == 0) return 0;
  if (v > 0) return 1;
  return -1;
}
void process() {
  for (int i = 1; i <= n; i++) {
    if (a[i] == 0) continue;
    int v = abs(a[i]), t = 2;
    while (t * t <= v) {
      if (v % t == 0) {
        int c = 0;
        while (v % t == 0) {
          ++c;
          v /= t;
        }
        if (c % 2 == 1) bad[i].push_back(t);
      }
      ++t;
    }
    if (v > 1) bad[i].push_back(v);
  }
  for (int i = 2; i <= n; i++) {
    if (a[i] == 0) continue;
    for (int j = i - 1; j >= 1; j--) {
      if (sign(a[i]) == sign(a[j]) && bad[i] == bad[j]) {
        prv[i] = j;
        break;
      }
    }
  }
}
void solve() {
  for (int i = 1; i <= n; i++) {
    int zero = 0, ng = 0;
    for (int j = i; j <= n; j++) {
      if (a[j] == 0)
        zero = 1;
      else if (prv[j] < i)
        ++ng;
      ++ans[max(ng, zero)];
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  process();
  solve();
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  puts("");
}
