#include <bits/stdc++.h>
using namespace std;
const long long int hell = (long long int)(1e18 + 100LL);
const double pi = acos(-1.0);
long long int ff(long long int n) {
  long long int x = 1LL;
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      long long int c = 0;
      while (n % i == 0) {
        c++;
        n /= i;
      }
      if (c & 1) x *= i;
    }
  }
  x *= n;
  return x;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t, i, j, k, m, n, x, y, z;
  t = 1;
  while (t--) {
    long long int flag = 0, K;
    cin >> n;
    vector<long long int> V;
    for (i = 0; i < n; i++) {
      cin >> x;
      y = abs(x);
      z = ff(y);
      if (x < 0) z = -z;
      V.push_back(z);
    }
    map<long long int, long long int> mp;
    for (auto it : V) mp[it];
    long long int c = 1;
    for (auto it : mp) {
      mp[it.first] = c++;
    }
    for (i = 0; i < n; i++) V[i] = mp[V[i]];
    long long int zero = 0;
    if (mp.find(0) != mp.end()) zero = mp[0];
    vector<long long int> ans(n + 1);
    for (i = 0; i < n; i++) {
      vector<long long int> S(c + 5, 0);
      long long int c = 0;
      long long int z = 0;
      for (j = i; j < n; j++) {
        if (V[j] == zero) {
          z = 1;
        } else if (S[V[j]] == 0) {
          S[V[j]] = 1;
          c++;
        }
        if (c == 0) {
          ans[1]++;
          continue;
        }
        ans[c]++;
      }
    }
    for (i = 1; i <= n; i++) cout << ans[i] << " ";
  }
  return 0;
}
