#include <bits/stdc++.h>
using namespace std;
long long in() {
  long long a;
  scanf("%lld", &a);
  return a;
}
double din() {
  double a;
  scanf("%lf", &a);
  return a;
}
long long bigmod(long long b, long long p, long long md) {
  if (p == 0) return 1;
  if (p % 2 == 1) {
    return ((b % md) * bigmod(b, p - 1, md)) % md;
  } else {
    long long y = bigmod(b, p / 2, md);
    return (y * y) % md;
  }
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  int n = in();
  int ar[n + 5];
  for (int i = 0; i < n; i++) ar[i] = in();
  for (int i = 0; i < n; i++) {
    if (ar[i] == 0) continue;
    int x = ar[i];
    ar[i] = 1;
    if (x < 0) ar[i] = -1, x = -x;
    for (long long j = 2; j * j <= x; j++) {
      int cnt = 0;
      if (x % j == 0) {
        while (x % j == 0) {
          cnt++;
          x /= j;
        }
        if (cnt % 2) ar[i] *= j;
      }
    }
    if (x > 1) ar[i] *= x;
  }
  map<int, int> mpp;
  int pos = 1;
  for (int i = 0; i < n; i++) {
    if (ar[i] == 0) continue;
    if (mpp[ar[i]] == 0) {
      mpp[ar[i]] = pos;
      ar[i] = pos;
      pos++;
    } else
      ar[i] = mpp[ar[i]];
  }
  int ase[n + 5];
  int ans[n + 5];
  int cnt = 0;
  memset(ans, 0, sizeof ans);
  for (int i = 0; i < n; i++) {
    memset(ase, 0, sizeof ase);
    for (int j = i; j < n; j++) {
      if (ar[j] != 0) {
        if (ase[ar[j]] == 0) cnt++;
        ase[ar[j]]++;
      }
      ans[max(1, cnt)]++;
    }
    cnt = 0;
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  puts("");
}
