#include <bits/stdc++.h>
using namespace std;
int n, ans[5005], blo[5005], cnt, ss[5005], s[5005];
struct map<long long, int> w[2];
int main() {
  int x, flag, sum;
  long long ha;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    flag = 0;
    ha = 0;
    s[i] = x;
    if (!x) continue;
    if (x < 0) x = -x, flag = 1;
    for (int j = 2; j * j <= x; j++) {
      if (x % j) continue;
      sum = 0;
      while (!(x % j)) x /= j, sum++;
      if (sum & 1) ha = ha * 19990213 + j;
    }
    if (x > 1) ha = ha * 19990213 + x;
    if (!w[flag][ha]) w[flag][ha] = ++cnt;
    blo[i] = w[flag][ha];
  }
  for (int i = 1; i <= n; i++) {
    memset(ss, 0, sizeof(ss));
    sum = 0;
    flag = 0;
    for (int j = i; j <= n; j++) {
      if (!s[j]) flag = 1;
      if (!ss[blo[j]]) sum++;
      ss[blo[j]]++;
      ans[max(sum - flag, 1)]++;
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
