#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e3 + 50;
long long s[maxn];
int n;
int pre[maxn];
int ans[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &s[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (s[i] == 0) continue;
    for (int j = i - 1; j >= 1; j--) {
      if ((s[i] > 0 && s[j] < 0) || s[i] < 0 && s[j] > 0) continue;
      if (s[j] == 0) continue;
      long long x = s[i] * s[j];
      long long d = sqrt(x);
      if (d * d == x) {
        pre[i] = j;
        break;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    int num = 0;
    for (int j = i; j <= n; j++) {
      if (pre[j] < i && s[j] != 0) num++;
      ans[max(num, 1)]++;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (i != 1) printf(" ");
    printf("%d", ans[i]);
  }
  return 0;
}
