#include <bits/stdc++.h>
using namespace std;
int n, a[5010];
vector<int> b;
int ans[5010], cnt[5010];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    for (int j = 2; j * j <= abs(a[i]); ++j)
      while (a[i] % (j * j) == 0) a[i] /= j * j;
    b.push_back(a[i]);
  }
  sort(b.begin(), b.end());
  b.erase(unique(b.begin(), b.end()), b.end());
  for (int i = 1; i <= n; ++i)
    a[i] = lower_bound(b.begin(), b.end(), a[i]) - b.begin();
  for (int i = 1; i <= n; ++i) {
    fill(cnt, cnt + n, 0);
    for (int j = i, s = 0; j <= n; ++j) {
      if (++cnt[a[j]] == 1 && b[a[j]]) ++s;
      ++ans[max(1, s)];
    }
  }
  for (int i = 1; i <= n; ++i) cout << ans[i] << " \n"[i == n];
  return 0;
}
