#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5005;
int n;
long long a[MAXN];
int cnt[MAXN], ans[MAXN];
inline long long sqr(long long x) { return x * x; }
inline bool is_sqr(long long x) {
  if (x < 0) return false;
  long long y = sqrt(x);
  return sqr(y) == x || sqr(y + 1) == x;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", a + i);
    ans[cnt[i] = 1]++;
    bool flag = (a[i] == 0);
    for (int j = i - 1; j > 0; j--) {
      if (a[j] == 0)
        cnt[j] = cnt[j + 1];
      else {
        if (is_sqr(a[i] * a[j])) flag = true;
        if (!flag) cnt[j]++;
      }
      ans[cnt[j]]++;
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
