#include <bits/stdc++.h>
using namespace std;
int pri[10000 + 5];
void getPrime() {
  int i, j;
  for (i = 2; i <= 10000; i++) {
    if (pri[i] == 0) pri[++pri[0]] = i;
    for (j = 1; j <= pri[0] && pri[j] <= 10000 / i; j++) {
      pri[pri[j] * i] = 1;
      if (i % pri[j] == 0) break;
    }
  }
}
int n;
int a[100005];
int ans[100005];
unordered_set<int> s;
int f(int x) {
  int xx = x;
  for (int i = 1; i <= pri[0]; i++) {
    if (pri[i] * pri[i] > xx) break;
    while (xx % (pri[i] * pri[i]) == 0) {
      xx /= pri[i] * pri[i];
    }
  }
  return xx;
}
int main() {
  getPrime();
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == 0)
      a[i] = 0;
    else if (a[i] > 0)
      a[i] = f(a[i]);
    else
      a[i] = -f(-a[i]);
  }
  for (int i = 1; i <= n; i++) {
    s.clear();
    for (int j = i; j <= n; j++) {
      if (a[j] != 0) s.insert(a[j]);
      ans[max(1, (int)s.size())]++;
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%d", ans[i]);
    if (i != n) printf(" ");
  }
  printf("\n");
  return 0;
}
