#include <bits/stdc++.h>
using namespace std;
const int maxn = 5000 + 7;
int n, a[maxn], ans[maxn], b[maxn], id;
map<int, int> mp;
int t0 = 0, t1 = 0, t2 = 0;
int cnt[maxn];
void work(int id) {
  for (int i = 2;; ++i) {
    int t = i * i;
    if (a[id] >= 0 && t > a[id]) return;
    if (a[id] < 0 && t > -1 * a[id]) return;
    if (a[id] % t == 0) {
      while (a[id] % t == 0) {
        a[id] /= t;
      }
    }
  }
}
void init() {
  scanf("%d", &n);
  id = 1;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    work(i);
    int t;
    if (t = mp[a[i]])
      b[i] = t;
    else
      b[i] = mp[a[i]] = id++;
  }
  memset(ans, 0, sizeof ans);
}
int main() {
  init();
  for (int i = 1; i <= n; ++i) {
    for (int k = 1; k < id; ++k) cnt[k] = 0;
    int sum = 0;
    for (int j = i; j <= n; ++j) {
      if (a[j] && !cnt[b[j]]) {
        sum++;
      }
      cnt[b[j]]++;
      ans[max(1, sum)]++;
    }
  }
  for (int i = 1; i <= n; ++i) {
    printf("%d%c", ans[i], (i == n ? '\n' : ' '));
  }
  return 0;
}
