#include <bits/stdc++.h>
using namespace std;
const int mxN = 1e5 + 5;
const long long INF = 1e18;
const long long mod = 1e9 + 7;
void solve() {
  int n;
  cin >> n;
  vector<long long> v(n), check(n);
  for (int i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v[i] = abs(x);
    if (x < 0) check[i] = 1;
  }
  for (int i = 0; i < n; i++) {
    if (v[i] == 0 || v[i] == 1) continue;
    long long temp = 1;
    for (long long j = 2; j * j <= v[i]; j++) {
      if (v[i] % j != 0) continue;
      int cnt = 0;
      while (v[i] % j == 0) {
        v[i] /= j;
        cnt++;
      }
      if (cnt & 1) temp *= j;
    }
    if (v[i] > 1) temp *= v[i];
    v[i] = temp;
  }
  for (int i = 0; i < n; i++) {
    if (check[i]) v[i] *= (-1);
  }
  map<long long, vector<long long> > make_pair;
  for (int i = 0; i < n; i++) {
    if (v[i] != 0) make_pair[v[i]].push_back(i);
  }
  int cur = 0;
  for (auto x : make_pair) {
    cur++;
    for (auto y : x.second) {
      v[y] = cur;
    }
  }
  vector<int> m(n + 100);
  for (int i = 0; i < n; i++) {
    vector<int> freq(n + 100, 0);
    int cur = 0;
    for (int j = i; j < n; j++) {
      if (freq[v[j]] == 0 && v[j] != 0) {
        cur++;
        freq[v[j]]++;
      }
      m[cur + (cur == 0)]++;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << m[i + 1] << " ";
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
