#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e4;
int a[maxn], pre[maxn], ans[maxn];
int check(long long x) {
  if (x < 0) return 0;
  long long temp = (long long)sqrt(x);
  if (temp * temp == x) return 1;
  return 0;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < n; i++) {
    pre[i] = i;
    for (int j = i - 1; j >= 0; j--) {
      if (a[j] && check(1ll * a[i] * a[j])) {
        pre[i] = j;
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    int cnt = 0;
    for (int j = i; j < n; j++) {
      if (pre[j] != j && pre[j] >= i) {
      } else {
        if (a[j]) cnt++;
      }
      ans[cnt]++;
    }
  }
  ans[1] += ans[0];
  for (int i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
  cout << endl;
  return 0;
}
