#include <bits/stdc++.h>
using namespace std;
map<long long, long long> M;
vector<long long> V;
long long a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w,
    x, y, z, pre;
long long A[5005], B[5005];
const int N = 1e8 + 2;
string T, S;
bitset<N> pos, neg;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a;
    b = 1;
    for (j = 2; j * j <= abs(a); j++) {
      c = 0;
      while (!(a % j)) {
        a /= j;
        c++;
      }
      if (c % 2) b *= j;
    }
    A[i] = b * a;
  }
  for (i = 1; i <= n; i++) {
    s = 0;
    for (j = i; j <= n; j++) {
      p = abs(A[j]);
      if (A[j] > 0 && !pos[p]) {
        pos[p] = 1;
        s++;
      } else if (A[j] < 0 && !neg[p]) {
        neg[p] = 1;
        s++;
      }
      B[max(s, 1ll)]++;
    }
    for (j = i; j <= n; j++) {
      p = abs(A[j]);
      pos[p] = 0;
      neg[p] = 0;
    }
  }
  for (i = 1; i <= n; i++) cout << B[i] << ' ';
  return 0;
}
