#include <bits/stdc++.h>
using namespace std;
inline void R(int &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= f;
}
inline void R(long long &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= f;
}
void Redirect() {
  freopen(".in", "r", stdin);
  freopen(".out", "w", stdout);
}
int a[5050];
int l[5050];
int r[5050];
int ans[5050];
int n;
template <typename T>
int sgn(T val) {
  return (T(0) < val) - (val < T(0));
}
bool is_sqr(long long x, long long y) {
  if (sgn(x) != sgn(y) && sgn(x) && sgn(y)) return 0;
  int rt = sqrt((long long)x * y) + 0.5;
  return (long long)rt * rt == (long long)x * y;
}
int main() {
  R(n);
  for (int i = 1; i <= n; i += 1) {
    l[i] = -1;
    R(a[i]);
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = i - 1; j; --j) {
      if (a[j] == 0) continue;
      if (is_sqr(a[i], a[j])) {
        l[i] = j;
        break;
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    int cur = 0;
    int fz = 0;
    bool all_zero = true;
    for (int j = i; j <= n; ++j) {
      all_zero &= (a[j] == 0);
      if (all_zero)
        cur = 1;
      else {
        if (!fz) {
          fz = j;
          cur = 1;
        } else {
          if (l[j] < fz) cur++;
        }
      }
      ans[cur]++;
    }
  }
  for (int i = 1; i <= n; ++i) {
    printf("%d ", ans[i]);
  }
  puts("");
}
