#include <bits/stdc++.h>
using namespace std;
const long long N = 5255;
long long n, m;
long long a[N], b[N];
long long ans[N], rec[N];
inline long long gt(long long u) {
  long long flg = u < 0 ? -1 : 1;
  u = u * flg;
  for (long long i = 2; i * i <= u; ++i) {
    while (u % (i * i) == 0) u = u / (i * i);
  }
  return u * flg;
}
signed main() {
  cin >> n;
  for (long long i = 1; i <= n; ++i) {
    scanf("%lld", &a[i]);
    a[i] = b[i] = gt(a[i]);
  }
  sort(b + 1, b + n + 1);
  m = unique(b + 1, b + n + 1) - b - 1;
  for (long long i = 1; i <= n; ++i) {
    if (a[i] != 0) a[i] = lower_bound(b + 1, b + m + 1, a[i]) - b + 1;
  }
  for (long long i = 1; i <= n; ++i) {
    long long cnt = 0;
    bool flag = 1;
    memset(rec, 0, sizeof(rec));
    for (long long j = i; j <= n; ++j) {
      if (flag == 0) {
        if (a[j] == 0)
          ;
        else {
          if (rec[a[j]] == 0) cnt++;
        }
      } else {
        if (i == j) {
          if (a[j] != 0)
            flag = 0, cnt++;
          else
            cnt++;
        } else {
          if (a[j] != 0)
            flag = 0;
          else
            ;
        }
      }
      rec[a[j]] = 1;
      ans[cnt]++;
    }
  }
  for (long long i = 1; i <= n; ++i) {
    printf("%lld ", ans[i]);
  }
  puts("");
}
