#include <bits/stdc++.h>
using namespace std;
const int N = 5005;
int n, a[N], id[N], ans[N], vis[N], cnt;
map<int, int> ma;
inline int read() {
  int ret = 0, ff = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') ff = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    ret = ret * 10 + (ch ^ 48);
    ch = getchar();
  }
  return ret * ff;
}
void write(int x) {
  if (x < 0) {
    x = -x, putchar('-');
  }
  if (x > 9) write(x / 10);
  putchar(x % 10 + 48);
}
void writeln(int x) { write(x), puts(""); }
void writesp(int x) { write(x), putchar(' '); }
int calc(int x) {
  int fl = 1;
  if (x < 0) fl = -1, x = -x;
  int lim = sqrt(x);
  for (int i = 2; i <= lim; i++)
    while (x % (i * i) == 0) x /= i * i;
  return x * fl;
}
signed main() {
  n = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    a[i] = calc(a[i]);
    if (!ma[a[i]]) {
      id[i] = ++cnt;
      ma[a[i]] = cnt;
    } else
      id[i] = ma[a[i]];
  }
  for (int i = 1; i <= n; i++) {
    memset(vis, 0, sizeof(vis));
    int gs = 0;
    for (int j = i; j <= n; j++) {
      if (!a[j]) {
        if (!gs)
          ans[1]++;
        else
          ans[gs]++;
      } else {
        if (!vis[id[j]]) {
          vis[id[j]] = 1;
          gs++;
        }
        ans[gs]++;
      }
    }
  }
  for (int i = 1; i <= n; i++) writesp(ans[i]);
  return 0;
}
