#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e3 + 10;
int n;
int a[maxn], f[maxn], ans[maxn];
inline int cal(int x) {
  int t = ceil(sqrt(abs(x)));
  for (int i = 2; i <= t; i++) {
    while (x % (i * i) == 0) x /= (i * i);
  }
  return x;
}
int main() {
  while (~scanf("%d", &n)) {
    for (int i = 1; i <= n; i++) {
      ans[i] = 0;
      f[i] = -1;
      scanf("%d", &a[i]);
      a[i] = cal(a[i]);
    }
    for (int i = 2; i <= n; i++)
      for (int j = i - 1; j >= 1; j--) {
        if (a[i] == a[j]) {
          f[i] = j;
          break;
        }
      }
    for (int i = 1; i <= n; i++) {
      int num = 0;
      for (int j = i; j <= n; j++) {
        if (f[j] < i && a[j] != 0) ++num;
        if (num == 0)
          ++ans[1];
        else
          ++ans[num];
      }
    }
    for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
    printf("\n");
  }
  return 0;
}
