#include <bits/stdc++.h>
using namespace std;
const int N = 5e3 + 3;
int ans[N], n, a[N], b[N], c[N];
queue<int> q;
int m[N];
int main() {
  memset(ans, 0, sizeof(ans));
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    int f = ((a[i] > 0) ? 1 : -1);
    a[i] *= f;
    int x = (long long)sqrt(a[i]);
    for (int j = 2; j <= x; ++j) {
      while (a[i] % (j * j) == 0) a[i] /= (j * j);
    }
    a[i] *= f;
    c[i] = a[i];
  }
  sort(c + 1, c + n + 1);
  for (int i = 1; i <= n; ++i)
    b[i] = (int)(lower_bound(c + 1, c + n + 1, a[i]) - c);
  for (int i = 1; i <= n; ++i) {
    while (!q.empty()) {
      m[b[q.front()]] = 0;
      q.pop();
    }
    int x = 0, z = 0;
    bool d = 0;
    for (int j = i; j <= n; ++j) {
      if (a[j] == 0) {
        ++z;
        if (z == j - i + 1) x = 1;
      } else {
        if (z > 0 && !d) {
          --x;
          d = 1;
        }
      }
      if (m[b[j]] == 0 && a[j] != 0) {
        d = 1;
        ++x;
        m[b[j]] = 1;
        q.push(j);
      }
      ++ans[x];
    }
  }
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  return 0;
}
