#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 1;
const int OFFSET = 1e8;
int a[N], res[N];
bool used[2 * OFFSET + 1];
int reduce(int x) {
  for (int i = 2; i * i <= abs(x); i++)
    while (!(x % (i * i))) x /= (i * i);
  return x;
}
int main() {
  ios::sync_with_stdio(false);
  int n, tmp;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> tmp;
    a[i] = reduce(tmp) + OFFSET;
  }
  for (int i = 0; i < n; i++) {
    int c = 0;
    for (int j = i; j < n; j++) {
      if (a[j] == OFFSET)
        res[max(1, c)]++;
      else if (used[a[j]])
        res[c]++;
      else {
        used[a[j]] = 1;
        c++;
        res[c]++;
      }
    }
    for (int j = n - 1; j >= i; j--) used[a[j]] = 0;
  }
  for (int i = 1; i < n + 1; i++) cout << res[i] << " ";
  cout << endl;
  ;
  ;
}
