#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const int INF = 1e9 + 7;
const int N = 2e5 + 7;
const int M = 5e6 + 7;
int a[N], f[N], ans[N];
int get(int x) {
  int k = ceil(sqrt(abs(x) * 1.00));
  for (int i = 2; i <= k; i++)
    while (x % (i * i) == 0) x /= i * i;
  return x;
}
signed main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i] = get(a[i]);
  }
  f[1] = -1;
  for (int i = 2; i <= n; i++) {
    for (int j = i - 1; j >= 1; --j)
      if (a[i] == a[j]) {
        f[i] = j;
        break;
      }
  }
  for (int i = 1; i <= n; i++) {
    int num = 0;
    for (int j = i; j <= n; j++) {
      if (f[j] < i && a[j] != 0) num++;
      if (!num)
        ans[1]++;
      else
        ans[num]++;
    }
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << "\n";
  return 0;
}
