#include <bits/stdc++.h>
using namespace std;
const long long N = 5005;
const long long M = 1e5 + 1;
const long long Inf = 1e18;
long long a[N];
long long lst[N];
long long Ans[N];
vector<long long> p[N];
vector<long long> primes;
bool Is_Prime[M];
void add(long long i, long long x) {
  if (p[i].empty() || p[i].back() != x)
    p[i].push_back(x);
  else
    p[i].pop_back();
}
int main() {
  memset(Is_Prime, true, sizeof(Is_Prime));
  Is_Prime[0] = Is_Prime[1] = false;
  for (long long i = 1; i < M; i++)
    if (Is_Prime[i]) {
      primes.push_back(i);
      for (long long j = i * i; j < M; j += i) Is_Prime[j] = false;
    }
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    scanf("%I64d", a + i);
    long long x = abs(a[i]);
    for (long long j = 0; j < primes.size(); j++) {
      long long y = primes[j];
      if (y * y > x) break;
      if (x % y == 0) x /= y, add(i, y), --j;
    }
    if (x > 1) add(i, x);
  }
  for (long long i = 0; i < n; i++) {
    if (!a[i]) continue;
    lst[i] = -1;
    for (long long j = i - 1; j >= 0; j--)
      if (a[i] * a[j] > 0 && p[i] == p[j]) {
        lst[i] = j;
        break;
      }
  }
  for (long long i = 0; i < n; i++) {
    long long Res = 0;
    long long zero = 0;
    for (long long j = i; j < n; j++) {
      if (!a[j])
        zero = 1;
      else if (lst[j] < i)
        Res++;
      Ans[max(Res, zero)]++;
    }
  }
  for (long long i = 1; i <= n; i++) printf("%I64d ", Ans[i]);
}
