#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int a[maxn], pre[maxn];
int ans[maxn];
map<int, int> mp;
void print(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) print(x / 10);
  putchar(x % 10 + '0');
}
void read(int &x) {
  int f = 1;
  x = 0;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = x * 10 + s - '0';
    s = getchar();
  }
  x *= f;
}
int main() {
  int n;
  read(n);
  for (int i = 1; i <= n; i++) {
    read(a[i]);
    for (int j = 2; j * j <= abs(a[i]); j++) {
      while ((a[i] % (j * j)) == 0) a[i] /= j * j;
    }
  }
  for (int i = 1; i <= n; i++) {
    pre[i] = mp[a[i]];
    mp[a[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    int tmp = 0;
    for (int j = i; j <= n; j++) {
      if (a[j] && pre[j] < i) {
        tmp++;
      }
      ans[max(tmp, 1)]++;
    }
  }
  for (int i = 1; i <= n; i++) print(ans[i]), putchar(' ');
  puts("");
  return 0;
}
