#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  int neg = 0, c = getchar();
  x = 0;
  while ((c < '0' or c > '9') and (c != '-')) c = getchar();
  if (c == '-') neg = 1, c = getchar();
  while (c >= '0' and c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  if (neg) x = -x;
}
inline void writeln(int x) {
  int neg = 0, i = 0;
  char buffor[21];
  if (x < 0) neg = 1, x = -x;
  do {
    buffor[++i] = x % 10 + '0';
    x /= 10;
  } while (x);
  if (neg) putchar('-');
  while (i) putchar(buffor[i--]);
  putchar('\n');
}
const int maxN = 5010;
int n;
long long a[maxN], b[maxN];
int cnt[maxN], res[maxN];
void input() {
  cin >> n;
  for (int i = 1, _b = n; i <= _b; i++) cin >> a[i];
}
bool scp(long long a) {
  if (a < 0) return false;
  long long k = (long long)sqrt(a);
  if ((k + 1) * (k + 1) == a) return true;
  if (k * k == a) return true;
  return false;
}
void solve() {
  int gr = 0;
  for (int i = 1, _b = n; i <= _b; i++)
    if (a[i] != 0) {
      if (!b[i]) {
        b[i] = ++gr;
        for (int j = 1, _b = n; j <= _b; j++)
          if (a[j] != 0 && !b[j] && scp(a[j] * a[i])) {
            b[j] = gr;
          }
      }
    }
  for (int l = 1, _b = n; l <= _b; l++) {
    for (int i = 0, _b = n; i <= _b; i++) cnt[i] = 0;
    int re = 0;
    for (int r = l, _b = n; r <= _b; r++) {
      cnt[b[r]]++;
      if (cnt[b[r]] == 1 && a[r] != 0) re++;
      if (re > 0)
        res[re]++;
      else
        res[1]++;
    }
  }
  for (int i = 1, _b = n; i <= _b; i++) cout << res[i] << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  input();
  solve();
  return 0;
}
