#include <bits/stdc++.h>
using namespace std;
const int N = 5123;
int v[N], group[N], ans[N], f[N];
bool perfect(const int &a, const int &b) {
  if (!a or !b) return false;
  long long int current = 1LL * a * b;
  if (current < 0) return false;
  long long int kappa = round(sqrt(current));
  return kappa * kappa == current;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &v[i]), group[i] = i;
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j)
      if (perfect(v[i], v[j])) group[j] = group[i];
  memset(f, 0, sizeof f);
  for (int i = 0; i < n; ++i) {
    int qtd = 0, zero = 0;
    memset(f, 0, sizeof f);
    for (int j = i; j < n; ++j) {
      if (v[j] == 0)
        ++zero;
      else if (!f[group[j]]++)
        ++qtd;
      ++ans[max(int(zero > 0), qtd)];
    }
  }
  for (int i = 1; i <= n; ++i) printf("%d%c", ans[i], (i == n) ? '\n' : ' ');
  return 0;
}
