#include <bits/stdc++.h>
using namespace std;
int arr[200009];
int cnt[5005];
int prv[5005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    bool neg = false;
    if (arr[i] < 0) {
      neg = true;
      arr[i] *= -1;
    }
    if (arr[i] == 0) {
      continue;
    }
    int k = 2, num = 1;
    while (k * k <= arr[i]) {
      if (arr[i] % k == 0) {
        int cnt = 0;
        while (arr[i] % k == 0) {
          arr[i] /= k;
          cnt++;
        }
        if (cnt % 2) {
          num *= k;
        }
      }
      if (k == 2)
        k++;
      else
        k += 2;
    }
    if (arr[i] != 1) {
      num *= arr[i];
    }
    arr[i] = num;
    if (neg) arr[i] *= -1;
  }
  for (int i = 0; i < n; i++) {
    prv[i] = -1;
    for (int j = i - 1; j >= 0; j--) {
      if (arr[j] == arr[i]) {
        prv[i] = j;
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    int g = 0;
    for (int j = i; j < n; j++) {
      if (arr[j] != 0) {
        if (prv[j] < i) g++;
      }
      if (g == 0)
        cnt[1]++;
      else
        cnt[g]++;
    }
  }
  for (int i = 1; i <= n; i++) printf("%d ", cnt[i]);
  printf("\n");
  return 0;
}
